From a2f0ecf7419e58b7bd3a15257ecf954786e18128 Mon Sep 17 00:00:00 2001 From: Night Owl Date: Mon, 18 Dec 2017 02:44:42 +0500 Subject: [PATCH 1/2] Fix linking with libdl on some environments. --- cl_dll/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cl_dll/CMakeLists.txt b/cl_dll/CMakeLists.txt index e3ac075a..aa1e94f8 100644 --- a/cl_dll/CMakeLists.txt +++ b/cl_dll/CMakeLists.txt @@ -28,9 +28,6 @@ set (CLDLL_LIBRARY client) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-write-strings -DLINUX -D_LINUX -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DCLIENT_WEAPONS -DCLIENT_DLL -w") if (GOLDSOURCE_SUPPORT) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DGOLDSOURCE_SUPPORT") - if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ldl") - endif() endif() set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}") @@ -109,6 +106,9 @@ if(USE_VOICEMGR) endif() add_library (${CLDLL_LIBRARY} SHARED ${CLDLL_SOURCES}) +if (GOLDSOURCE_SUPPORT) + target_link_libraries( ${CLDLL_LIBRARY} ${CMAKE_DL_LIBS} ) +endif() set_target_properties (${CLDLL_SHARED} PROPERTIES POSITION_INDEPENDENT_CODE 1) From 3635706f15a59e1ed70877c4e67449e80214e286 Mon Sep 17 00:00:00 2001 From: Night Owl Date: Mon, 18 Dec 2017 04:32:25 +0500 Subject: [PATCH 2/2] Use cpu-dependent optimization for pentium 3. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index da740958..686d3bb4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ before_script: - mv SDL2-2.0.7/i686-w64-mingw32/include/SDL2 cl_dll/ script: - mkdir -p build && cd build - - cmake ../ -DCMAKE_C_FLAGS="-O2 -pipe -DNDEBUG -march=nocona -fvisibility=hidden -fomit-frame-pointer" -DCMAKE_CXX_FLAGS="-fno-exceptions -fno-rtti" -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined -Wl,--strip-all" -DGOLDSOURCE_SUPPORT=1 -DUSE_VOICEMGR=0 && make -j3 + - cmake ../ -DCMAKE_C_FLAGS="-O2 -pipe -DNDEBUG -march=pentium3 -fvisibility=hidden -fomit-frame-pointer" -DCMAKE_CXX_FLAGS="-fno-exceptions -fno-rtti" -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined -Wl,--strip-all" -DGOLDSOURCE_SUPPORT=1 -DUSE_VOICEMGR=0 && make -j3 - mkdir -p $TRAVIS_BRANCH-$TRAVIS_OS_NAME-$CC/cl_dlls - mkdir -p $TRAVIS_BRANCH-$TRAVIS_OS_NAME-$CC/dlls - cp cl_dll/libclient.* $TRAVIS_BRANCH-$TRAVIS_OS_NAME-$CC/cl_dlls