summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorpajoye <none@none>2008-04-17 20:41:41 +0000
committerpajoye <none@none>2008-04-17 20:41:41 +0000
commitde77a4fb0f9e742f1510b9660d1b47e18e0ca3f8 (patch)
treef85d8bd6cb20c909716f7dca8b2f3517d204cc2a /examples
parent501248d3ccf9289942aa4a787b8edbbbaad3acfe (diff)
downloadlibgd-de77a4fb0f9e742f1510b9660d1b47e18e0ca3f8.tar.gz
- fix windows GDI example build with mingw
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt19
1 files changed, 11 insertions, 8 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 95b06ca..6a15d17 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -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 @@ if (JPEG_FOUND)
SET(TESTS_FILES
"${TESTS_FILES}"
nnquant
+ copyrotated
+ flip
)
endif (JPEG_FOUND)
@@ -38,7 +35,13 @@ FOREACH(test_name ${TESTS_FILES})
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)