Fix possible link issue in OS X
This commit is contained in:
parent
4954d5fecb
commit
c218f915ba
|
@ -25,7 +25,7 @@ if(WIN32)
|
||||||
-i${CMAKE_CURRENT_SOURCE_DIR}/src/otcicon.rc
|
-i${CMAKE_CURRENT_SOURCE_DIR}/src/otcicon.rc
|
||||||
-o ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o)
|
-o ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o)
|
||||||
SET(executable_SOURCES ${executable_SOURCES} otcicon.o)
|
SET(executable_SOURCES ${executable_SOURCES} otcicon.o)
|
||||||
endif(WIN32)
|
endif()
|
||||||
|
|
||||||
# add otclient executable
|
# add otclient executable
|
||||||
add_executable(otclient ${framework_SOURCES} ${otclient_SOURCES} ${executable_SOURCES})
|
add_executable(otclient ${framework_SOURCES} ${otclient_SOURCES} ${executable_SOURCES})
|
||||||
|
|
|
@ -153,7 +153,9 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os")
|
||||||
|
|
||||||
# process options
|
# process options
|
||||||
if(USE_STATIC_LIBS)
|
if(USE_STATIC_LIBS)
|
||||||
|
if(NOT APPLE)
|
||||||
set(CMAKE_CXX_LINK_FLAGS "-static-libgcc -static-libstdc++")
|
set(CMAKE_CXX_LINK_FLAGS "-static-libgcc -static-libstdc++")
|
||||||
|
endif()
|
||||||
message(STATUS "Link to static libraries: ON")
|
message(STATUS "Link to static libraries: ON")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Link to static libraries: OFF")
|
message(STATUS "Link to static libraries: OFF")
|
||||||
|
@ -228,11 +230,11 @@ if(WIN32)
|
||||||
set(framework_DEFINITIONS ${framework_DEFINITIONS} -D_WIN32_WINNT=0x0501)
|
set(framework_DEFINITIONS ${framework_DEFINITIONS} -D_WIN32_WINNT=0x0501)
|
||||||
set(framework_DEFINITIONS ${framework_DEFINITIONS} -DBOOST_THREAD_USE_LIB) # fix boost thread linkage
|
set(framework_DEFINITIONS ${framework_DEFINITIONS} -DBOOST_THREAD_USE_LIB) # fix boost thread linkage
|
||||||
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,--large-address-aware") # strip all debug information
|
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,--large-address-aware") # strip all debug information
|
||||||
|
elseif(APPLE)
|
||||||
|
set(framework_DEFINITIONS ${framework_DEFINITIONS} -D_REENTRANT) # enable thread safe code
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
||||||
if(NOT APPLE)
|
|
||||||
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -rdynamic") # rdynamic is needed by backtrace.h used in crash handler
|
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -rdynamic") # rdynamic is needed by backtrace.h used in crash handler
|
||||||
endif()
|
|
||||||
set(framework_LIBRARIES ${framework_LIBRARIES} dl)
|
set(framework_LIBRARIES ${framework_LIBRARIES} dl)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue