Fix for building with CMake less than 3.13

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8606 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: ee517338133f9e06b79ab7e09c46135f3b12a664
Former-commit-id: 02f50fd73be0d06b3c12ab668512c229de59dba7
This commit is contained in:
beaglejoe 2022-10-19 18:21:14 +00:00
parent e0a6375924
commit 0ab4aab3ad
4 changed files with 32 additions and 27 deletions

View file

@ -95,10 +95,11 @@ ENDIF(UNIX)
SD_INSTALL_FILES(INCLUDE FILES glfeatures.h guiscreen.h tgfclient.h)
# To avoid 'undefined reference to glActiveTextureARB [--no-allow-shlib-undefined]'
IF(UNIX AND NOT APPLE)
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_options(tgfclient PRIVATE -Wl,--allow-shlib-undefined)
ENDIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
ENDIF(UNIX AND NOT APPLE)
IF(NOT ${CMAKE_VERSION} VERSION_LESS "3.13")
# To avoid 'undefined reference to glActiveTextureARB [--no-allow-shlib-undefined]'
IF(UNIX AND NOT APPLE)
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_options(tgfclient PRIVATE -Wl,--allow-shlib-undefined)
ENDIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
ENDIF(UNIX AND NOT APPLE)
ENDIF(NOT ${CMAKE_VERSION} VERSION_LESS "3.13")

View file

@ -55,12 +55,12 @@ IF(WIN32)
SD_INSTALL_CUSTOM_3RDPARTY(${_TARGET_NAME})
ENDIF(WIN32)
IF(NOT ${CMAKE_VERSION} VERSION_LESS "3.13")
# To avoid 'undefined reference to glActiveTextureARB [--no-allow-shlib-undefined]'
IF(UNIX AND NOT APPLE)
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_options(${_TARGET_NAME} PRIVATE -Wl,--allow-shlib-undefined)
ENDIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_options(${_TARGET_NAME} PRIVATE -Wl,-E)
ENDIF(UNIX AND NOT APPLE)
IF(UNIX AND NOT APPLE)
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_options(${_TARGET_NAME} PRIVATE -Wl,--allow-shlib-undefined)
ENDIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_options(${_TARGET_NAME} PRIVATE -Wl,-E)
ENDIF(UNIX AND NOT APPLE)
ENDIF(NOT ${CMAKE_VERSION} VERSION_LESS "3.13")

View file

@ -52,9 +52,11 @@ ENDIF(UNIX)
SD_INSTALL_FILES(BIN TARGETS ${_TARGET_NAME})
# To avoid 'undefined reference to glActiveTextureARB [--no-allow-shlib-undefined]'
IF(UNIX AND NOT APPLE)
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_options(${_TARGET_NAME} PRIVATE -Wl,--allow-shlib-undefined)
ENDIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
ENDIF(UNIX AND NOT APPLE)
IF(NOT ${CMAKE_VERSION} VERSION_LESS "3.13")
# To avoid 'undefined reference to glActiveTextureARB [--no-allow-shlib-undefined]'
IF(UNIX AND NOT APPLE)
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_options(${_TARGET_NAME} PRIVATE -Wl,--allow-shlib-undefined)
ENDIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
ENDIF(UNIX AND NOT APPLE)
ENDIF(NOT ${CMAKE_VERSION} VERSION_LESS "3.13")

View file

@ -56,9 +56,11 @@ ENDIF(UNIX)
SD_INSTALL_FILES(BIN TARGETS ${_TARGET_NAME})
# To avoid 'undefined reference to glActiveTextureARB [--no-allow-shlib-undefined]'
IF(UNIX AND NOT APPLE)
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_options(${_TARGET_NAME} PRIVATE -Wl,--allow-shlib-undefined)
ENDIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
ENDIF(UNIX AND NOT APPLE)
IF(NOT ${CMAKE_VERSION} VERSION_LESS "3.13")
# To avoid 'undefined reference to glActiveTextureARB [--no-allow-shlib-undefined]'
IF(UNIX AND NOT APPLE)
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_options(${_TARGET_NAME} PRIVATE -Wl,--allow-shlib-undefined)
ENDIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
ENDIF(UNIX AND NOT APPLE)
ENDIF(NOT ${CMAKE_VERSION} VERSION_LESS "3.13")