Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | |||||
# All versions of gcc that we commonly use for building are subject to bug | # All versions of gcc that we commonly use for building are subject to bug | ||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348. To work around that, set | # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348. To work around that, set | ||||
# -fstack-reuse=none for all gcc builds. (Only gcc understands this flag) | # -fstack-reuse=none for all gcc builds. (Only gcc understands this flag) | ||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") | if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") | ||||
add_compiler_flags(-fstack-reuse=none) | add_compiler_flags(-fstack-reuse=none) | ||||
endif() | endif() | ||||
# Ensure that WINDRES_PREPROC is enabled when using windres. | |||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | 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_linker_flags(-static) | add_linker_flags(-static) | ||||
# Windows 7 | |||||
add_compile_definitions(_WIN32_WINNT=0x0601) | |||||
endif() | endif() | ||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||||
add_compile_definitions(MAC_OSX OBJC_OLD_DISPATCH_PROTOTYPES=0) | add_compile_definitions(MAC_OSX OBJC_OLD_DISPATCH_PROTOTYPES=0) | ||||
add_linker_flags(-Wl,-dead_strip_dylibs) | add_linker_flags(-Wl,-dead_strip_dylibs) | ||||
endif() | endif() | ||||
if(ENABLE_REDUCE_EXPORTS) | if(ENABLE_REDUCE_EXPORTS) | ||||
▲ Show 20 Lines • Show All 549 Lines • Show Last 20 Lines |