summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
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)