Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||||
# Ensure that WINDRES_PREPROC is enabled when using windres. | # Ensure that WINDRES_PREPROC is enabled when using windres. | ||||
list(APPEND CMAKE_RC_FLAGS "-DWINDRES_PREPROC") | list(APPEND CMAKE_RC_FLAGS "-DWINDRES_PREPROC") | ||||
# Build all static so there is no dll file to distribute. | # Build all static so there is no dll file to distribute. | ||||
add_compiler_flags(-static) | add_compiler_flags(-static) | ||||
endif() | endif() | ||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||||
add_definitions(-DMAC_OSX) | add_definitions(-DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0) | ||||
endif() | endif() | ||||
if(ENABLE_REDUCE_EXPORTS) | if(ENABLE_REDUCE_EXPORTS) | ||||
# Default visibility is set by CMAKE_<LANG>_VISIBILITY_PRESET, but this | # Default visibility is set by CMAKE_<LANG>_VISIBILITY_PRESET, but this | ||||
# doesn't tell if the visibility set is effective. | # doesn't tell if the visibility set is effective. | ||||
# Check if the flag -fvisibility=hidden is supported, as using the hidden | # Check if the flag -fvisibility=hidden is supported, as using the hidden | ||||
# visibility is a requirement to reduce exports. | # visibility is a requirement to reduce exports. | ||||
check_compiler_flag(HAS_CXX_FVISIBILITY CXX -fvisibility=hidden) | check_compiler_flag(HAS_CXX_FVISIBILITY CXX -fvisibility=hidden) | ||||
▲ Show 20 Lines • Show All 471 Lines • Show Last 20 Lines |