cvs: gd /libgd/examples CMakeLists.txt

[email protected] ("Pierre-Alain Joye") Thu, 17 Apr 2008 20:41:41 -0000
Newsgroups php.gd.cvs
Message-ID <cvspajoye1208464901@cvsserver>
pajoye		Thu Apr 17 20:41:41 2008 UTC

  Modified files:              
    /gd/libgd/examples	CMakeLists.txt 
  Log:
  - fix windows GDI example build with mingw
  
http://cvs.php.net/viewvc.cgi/gd/libgd/examples/CMakeLists.txt?r1=1.11&r2=1.12&diff_format=u
Index: gd/libgd/examples/CMakeLists.txt
diff -u gd/libgd/examples/CMakeLists.txt:1.11 gd/libgd/examples/CMakeLists.txt:1.12
--- gd/libgd/examples/CMakeLists.txt:1.11	Thu Apr 17 17:03:45 2008
+++ gd/libgd/examples/CMakeLists.txt	Thu Apr 17 20:41:41 2008
@@ -1,16 +1,11 @@
-
-include_directories (BEFORE ${GD_SOURCE_DIR}/src "${CMAKE_BINARY_DIR}")
-
+include_directories (BEFORE "${GD_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}")
 
 SET(TESTS_FILES
-  tiffread
 #  resize
-  copyrotated
 #  ellipseaa
 #  ellipse
   arc
 #  ellipsearc
-  flip
   crop
 #  ellfullaa
   tgaread
@@ -22,6 +17,8 @@
 	SET(TESTS_FILES
 		"${TESTS_FILES}"
 		nnquant
+		copyrotated
+		flip
 	)
 endif (JPEG_FOUND)
 
@@ -38,7 +35,13 @@
 	target_link_libraries (${test_name} ${GD_LIB})
 ENDFOREACH(test_name)
 
-if (WIN32)
+if (WIN32 AND NOT MINGW AND NOT MSYS)
 	add_executable(windows WIN32 "windows.c")
 	target_link_libraries (${test_name} ${GD_LIB})
-endif (WIN32)
+else (WIN32 AND NOT MINGW AND NOT MSYS)
+	if (MINGW OR MSYS)
+		add_executable(windows "windows.c")
+		add_definitions("-mwindows")
+		target_link_libraries(windows ${GD_LIB} stdc++ gdi32)
+	endif (MINGW OR MSYS)
+endif (WIN32 AND NOT MINGW AND NOT MSYS)