Commits

Anonymous committed 2d2d87e

- fix windows cmake support
- use BGDWIN32 for now, static build and other windows options will follow shortly

  • Participants
  • Parent commits 850c6ff
  • Branches GD-2.0

Comments (0)

Files changed (1)

File src/CMakeLists.txt

 	ENABLE_TESTING()
 endif(BUILD_TEST)
 
+if (WIN32)
+	SET(BGDWIN32 1)
+	ADD_DEFINITIONS(-DBGDWIN32)
+endif (WIN32)
+
 if (USE_EXT_GD)
 	message("Using GD at: ${USE_EXT_GD}")
 	INCLUDE_DIRECTORIES(BEFORE ${GD_INCLUDE_DIR})
 
 	if (FREETYPE_FOUND)
 		INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIR})
-		message(STATUS "ft2build: ${HAVE_FT2BUILD_H} ${FREETYPE_INCLUDE_DIR}")
-		SET(HAVE_FT2BUILD_H 1)
 		SET(HAVE_LIBFREETYPE 1)
 	ENDIF(FREETYPE_FOUND)
 
 
 	CONFIGURE_FILE(config.h.cmake config.h ESCAPE_QUOTES)
 
-	add_library(gd ${LIBGD_SRC_FILES})
-	target_link_libraries(gd ${FREETYPE_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${XPM_LIBRARIES} ${FONTCONFIG_LIBRARIES})
-	SET(GD_LIB gd)
+	if (WIN32)
+		SET(GD_LIB bgd)
+	else(WIN32)
+		SET(GD_LIB gd)
+	endif(WIN32)
+	add_library(${GD_LIB} ${LIBGD_SRC_FILES})
+	target_link_libraries(${GD_LIB} ${FREETYPE_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${XPM_LIBRARIES} ${FONTCONFIG_LIBRARIES})
+
 endif (USE_EXT_GD)
 
 add_subdirectory(tests)