make linkage more platform independent
This commit is contained in:
parent
7cf246c97e
commit
b1e1487745
|
@ -44,6 +44,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -ggdb3 -fno-inline")
|
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -ggdb3 -fno-inline")
|
||||||
SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
||||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -g -fno-inline")
|
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -g -fno-inline")
|
||||||
|
SET(CMAKE_CXX_LINK_FLAGS "-rdynamic -static-libgcc -static-libstdc++ -Wl,--as-needed")
|
||||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
||||||
|
|
||||||
|
@ -189,7 +190,6 @@ IF(WIN32)
|
||||||
-o ${CMAKE_CURRENT_BINARY_DIR}/icon.o)
|
-o ${CMAKE_CURRENT_BINARY_DIR}/icon.o)
|
||||||
SET(SOURCES ${SOURCES} icon.o)
|
SET(SOURCES ${SOURCES} icon.o)
|
||||||
ELSE(WIN32)
|
ELSE(WIN32)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")
|
|
||||||
SET(ADDITIONAL_LIBRARIES -lpthread)
|
SET(ADDITIONAL_LIBRARIES -lpthread)
|
||||||
SET(SOURCES ${SOURCES} src/framework/platform/x11platform.cpp)
|
SET(SOURCES ${SOURCES} src/framework/platform/x11platform.cpp)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
|
@ -5,5 +5,4 @@ SET(CMAKE_RC_COMPILER i486-mingw32-windres)
|
||||||
SET(CMAKE_FIND_ROOT_PATH /usr/i486-mingw32)
|
SET(CMAKE_FIND_ROOT_PATH /usr/i486-mingw32)
|
||||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -static-libgcc -static-libstdc++")
|
|
Loading…
Reference in New Issue