- attempt to correct tomreyns cmake linker issue

This commit is contained in:
SoftCoder 2017-10-07 08:59:27 -07:00
parent eaad769182
commit 59be04ab6a
2 changed files with 87 additions and 80 deletions

View File

@ -122,7 +122,6 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
# ADD_DEFINITIONS("-Wreturn-type -fno-strict-aliasing -frounding-math -fsignaling-nans -mfpmath=sse -msse -DUNICODE")
# ADD_DEFINITIONS("-Wuninitialized -Wsign-compare -Wunused-function -Wunused-variable -Wreturn-type -fno-strict-aliasing -frounding-math -fsignaling-nans -DUNICODE")
ADD_DEFINITIONS("-DUNICODE")
ENDIF()
# CLang specific Compiler Options
@ -139,7 +138,6 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
ENDIF()
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
#MESSAGE(STATUS "*TEST: Checking for max SSE LEVEL [${FORCE_MAX_SSE_LEVEL}]")
OPTION(FORCE_STREFLOP_SOFTWRAPPER "Set the streflop library to be forced to use the software emulator" OFF)
@ -212,6 +210,15 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} -s") ## Strip binary
ENDIF()
# see if this fixes compile issue for tomreyn: libpthread.so.0: error adding symbols: DSO missing from command line
IF(UNIX)
MESSAGE(STATUS "*NOTE: Apply fix for: libpthread.so.0: error adding symbols: DSO missing from command line")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -pthread")
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -pthread")
SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} -pthread")
ENDIF()
# Get the git revision info for the binary
SET(HAS_GIT "FALSE")
SET(GIT_LIVE_REV_CMD "")

View File

@ -296,6 +296,7 @@ IF(BUILD_MEGAGLEST)
IF(WIN32)
TARGET_LINK_LIBRARIES(${TARGET_NAME} stdc++ gcc odbc32 wsock32 winspool winmm shell32 comctl32 ctl3d32 advapi32 wsock32 opengl32 glu32 ole32 oleaut32 uuid mingw32 ddraw dsound dxguid ws2_32 iphlpapi wsock32 libogg libvorbis libvorbisfile zlib jpeg libpng xerces-c2_8_0 OpenAL32 libcurl winmm gdi32 opengl32 glu32 ${SDL_VERSION_NAME} ${SDL_VERSION_NAME}main lua5.1 ${MG_STREFLOP} libmegaglest stdc++ moldname mingwex msvcrt user32 kernel32)
ENDIF()
IF(NOT WIN32)
IF(WANT_USE_STREFLOP AND NOT STREFLOP_FOUND)
TARGET_LINK_LIBRARIES(${TARGET_NAME} ${MG_STREFLOP})
@ -311,7 +312,6 @@ IF(BUILD_MEGAGLEST)
IF(EXISTS ${HELP2MAN})
MESSAGE(STATUS "***-- Found help2man: ${HELP2MAN} about to build manpage in [${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE}]")
SET(MG_MANPAGE_DESCRIPTION "3D multi-player real time strategy game")
IF(EXISTS ${XVFB_EXEC})