aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2019-01-02 05:36:24 -0600
committerBrent Cook <busterb@gmail.com>2019-01-02 05:37:35 -0600
commitc23f745179fb9ce7543bc4507cea92c98c16b4dc (patch)
tree229c5002ee443665c1655c476e19089f3a3329f9 /CMakeLists.txt
parentd5c155fcb8ab8d22f76e2f0b52728eade540bd67 (diff)
downloadportable-c23f745179fb9ce7543bc4507cea92c98c16b4dc.tar.gz
portable-c23f745179fb9ce7543bc4507cea92c98c16b4dc.tar.bz2
portable-c23f745179fb9ce7543bc4507cea92c98c16b4dc.zip
add some defines for building Mingw cross-compiled with CMake
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fe5837..1efe6bc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -59,12 +59,12 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
59 set(PLATFORM_LIBS ${PLATFORM_LIBS} pthread) 59 set(PLATFORM_LIBS ${PLATFORM_LIBS} pthread)
60endif() 60endif()
61 61
62if(CMAKE_SYSTEM_NAME MATCHES "MINGW") 62if(WIN32 OR (CMAKE_SYSTEM_NAME MATCHES "MINGW"))
63 set(BUILD_NC false)
64endif()
65
66if(WIN32)
67 set(BUILD_NC false) 63 set(BUILD_NC false)
64 add_definitions(-D_GNU_SOURCE)
65 add_definitions(-D_POSIX)
66 add_definitions(-D_POSIX_SOURCE)
67 add_definitions(-D__USE_MINGW_ANSI_STDIO)
68endif() 68endif()
69 69
70set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall") 70set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall")