Commits

Anonymous committed 09746d3

- CMake test should work now

Comments (0)

Files changed (3)

 	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)
 

src/CMakeLists.txt

 	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)

tests/CMakeLists.txt

 	#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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.