diff options
author | Johannes Ekberg <uppfinnarn@gmail.com> | 2014-12-24 10:34:25 +0100 |
---|---|---|
committer | Johannes Ekberg <uppfinnarn@gmail.com> | 2015-01-09 15:50:46 +0100 |
commit | 7d7ab70279df554959eec29ff43a2eb304a3d578 (patch) | |
tree | 13443156725388ffc3fe8b1208a7a39c6d29ea93 /CMakeLists.txt | |
parent | d46f6500363024ac58cc23ba706e26d531a6076a (diff) |
Generic PLATFORM_LIBRARIES var
This both reduces redundancy in add_executable definitions, and makes it easier to link additional libraries. In particular, extra libraries are needed on OSX - see next commit.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 884520ce..36b9344e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,8 +108,14 @@ endif() IF (APPLE) # CoreFoundation is required only on OSX FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) + SET(PLATFORM_LIBRARIES iconv ${COREFOUNDATION_LIBRARY}) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") +ELSEIF(WIN32) + set(PLATFORM_LIBRARIES winmm) +ELSE() + set(PLATFORM_LIBRARIES rt) ENDIF (APPLE) option(ENABLE_QT "Enable the Qt frontend" ON) |