1. libgd
  2. Untitled project
  3. gd-libgd

Commits

pajoye  committed 09746d3

- CMake test should work now

  • Participants
  • Parent commits 82c4d81
  • Branches master

Comments (0)

Files changed (3)

File CMakeLists.txt

View file
  • Ignore whitespace
 	SET(HAVE_CONFIG_H 1)
 
 	ADD_DEFINITIONS(-DHAVE_CONFIG_H)
-
-
 	
 	CONFIGURE_FILE(${GD_SOURCE_DIR}/src/config.h.cmake ${CMAKE_BINARY_DIR}/config.h ESCAPE_QUOTES)
-	add_subdirectory(src)
 
+	set(BUILD_SHARED_LIBS On)
+
+	if (WIN32)
+		SET(GD_LIB bgd)
+		ADD_DEFINITIONS( -DWIN32 -D_WIN32 -DMSWIN32 -DBGDWIN32)
+	else(WIN32)
+		SET(GD_LIB gd)
+	endif(WIN32)
+
+	add_subdirectory(src)
+	message("GD_LIB Main: ${GD_LIB}")
 endif (USE_EXT_GD)
 add_subdirectory(tests)
 

File src/CMakeLists.txt

View file
  • Ignore whitespace
 	wbmp.h
 )
 
-set(BUILD_SHARED_LIBS On)
-
-if (WIN32)
-	SET(GD_LIB bgd)
-	ADD_DEFINITIONS( -DWIN32 -D_WIN32 -DMSWIN32 -DBGDWIN32)
-else(WIN32)
-	SET(GD_LIB gd)
-endif(WIN32)
-
 add_library(${GD_LIB} ${LIBGD_SRC_FILES})
 
 if (WIN32)

File tests/CMakeLists.txt

View file
  • Ignore whitespace
 	#FIND_LIBRARY(GD_LIB "gd" PATHS ${GD_LIBS_DIR})
 	#message(STATUS "GD_LIB: ${GD_LIB}")
 
+	include_directories (BEFORE ${GD_INCLUDE_DIR} "${GDTEST_SOURCE_DIR}" "${CMAKE_BINARY_DIR}")
+
+
 	SET(TESTS_DIRS
 		gdtest
 		gdimagearc