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.
This commit is contained in:
parent
d46f650036
commit
7d7ab70279
3 changed files with 8 additions and 19 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue