Source

gd-libgd / src / CMakeLists.txt

Diff from to

File src/CMakeLists.txt

 		SET(HAVE_LIBFONTCONFIG 1)
 	ENDIF(FONTCONFIG_FOUND)
 
-	#FIND_PATH(HAVE_ERRNO_H errno.h)
-	#FIND_PATH(HAVE_STRINGS_H strings.h)
-	#FIND_PATH(HAVE_LIMITS_H limits.h )
-	#SET(HAVE_ERRNO_H 1)
-	#SET(HAVE_LIBM 1)
-	#FIND_PATH(HAVE_MEMORY_H memory.h)
-
-	#FIND_PATH(HAVE_STRING_H string.h)
-	#FIND_PATH(HAVE_SYS_STAT_H 1)
-	#FIND_PATH(HAVE_SYS_TYPES_H 1)
-	#FIND_PATH(HAVE_UNISTD_H unistd.h)
-	#FIND_PATH(STDC_HEADERS 1)
-	#FIND_PATH(HAVE_INTTYPES_H 1)
-	#FIND_PATH(HAVE_STDDEF_H stddef.h)
-	#FIND_PATH(HAVE_STDINT_H 1)
-	#FIND_PATH(HAVE_STDLIB_H stdlib.h)
-
 	SET(HAVE_CONFIG_H 1)
 
 	ADD_DEFINITIONS(-DHAVE_CONFIG_H)
 
+	INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/  ${GD_SOURCE_DIR})
+	
+	CONFIGURE_FILE(${GD_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h ESCAPE_QUOTES)
+
 	SET (LIBGD_SRC_FILES
 		gd.c
 		gdfx.c
 
 	set(BUILD_SHARED_LIBS On)
 
-	INCLUDE_DIRECTORIES(BEFORE ${GD_SOURCE_DIR}/)
-
-	CONFIGURE_FILE(config.h.cmake config.h ESCAPE_QUOTES)
-
 	if (WIN32)
 		SET(GD_LIB bgd)
+		ADD_DEFINITIONS(/nodefaultlib:library)
 	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)
+add_subdirectory(tests)