diff options
author | Brent Cook <busterb@gmail.com> | 2019-01-02 05:36:24 -0600 |
---|---|---|
committer | Brent Cook <busterb@gmail.com> | 2019-01-02 05:37:35 -0600 |
commit | c23f745179fb9ce7543bc4507cea92c98c16b4dc (patch) | |
tree | 229c5002ee443665c1655c476e19089f3a3329f9 /CMakeLists.txt | |
parent | d5c155fcb8ab8d22f76e2f0b52728eade540bd67 (diff) | |
download | portable-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.txt | 10 |
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) |
60 | endif() | 60 | endif() |
61 | 61 | ||
62 | if(CMAKE_SYSTEM_NAME MATCHES "MINGW") | 62 | if(WIN32 OR (CMAKE_SYSTEM_NAME MATCHES "MINGW")) |
63 | set(BUILD_NC false) | ||
64 | endif() | ||
65 | |||
66 | if(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) | ||
68 | endif() | 68 | endif() |
69 | 69 | ||
70 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall") | 70 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall") |