Cmake: remove old unneeded POLICIES (fix Appveyor) (#2859)
This commit is contained in:
parent
a6d3229e74
commit
ccee0aa3fd
4 changed files with 5 additions and 33 deletions
|
@ -8,28 +8,10 @@
|
||||||
# Cmake 3.1 is required to enable C++11 support correctly
|
# Cmake 3.1 is required to enable C++11 support correctly
|
||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
|
||||||
if(POLICY CMP0020)
|
|
||||||
cmake_policy(SET CMP0020 OLD)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(POLICY CMP0043)
|
|
||||||
cmake_policy(SET CMP0043 OLD)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(POLICY CMP0048)
|
|
||||||
cmake_policy(SET CMP0048 OLD)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(POLICY CMP0064)
|
if(POLICY CMP0064)
|
||||||
cmake_policy(SET CMP0064 OLD)
|
cmake_policy(SET CMP0064 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(PROJECT_NAME "Cockatrice")
|
|
||||||
# Can be overriden by git tags, see cmake/getversion.cmake
|
|
||||||
set(PROJECT_VERSION_MAJOR "2")
|
|
||||||
set(PROJECT_VERSION_MINOR "3")
|
|
||||||
set(PROJECT_VERSION_PATCH "18")
|
|
||||||
|
|
||||||
# Default to "Release" build type
|
# Default to "Release" build type
|
||||||
# User-provided value for CMAKE_BUILD_TYPE must be checked before the PROJECT() call
|
# User-provided value for CMAKE_BUILD_TYPE must be checked before the PROJECT() call
|
||||||
IF(DEFINED CMAKE_BUILD_TYPE)
|
IF(DEFINED CMAKE_BUILD_TYPE)
|
||||||
|
@ -39,7 +21,8 @@ ELSE()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# A project name is needed for CPack
|
# A project name is needed for CPack
|
||||||
PROJECT("${PROJECT_NAME}")
|
# Version can be overriden by git tags, see cmake/getversion.cmake
|
||||||
|
PROJECT("Cockatrice" VERSION 2.3.18)
|
||||||
|
|
||||||
# Use c++11 for all targets
|
# Use c++11 for all targets
|
||||||
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ ISO Standard")
|
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ ISO Standard")
|
||||||
|
|
|
@ -221,11 +221,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
# Build cockatrice binary and link it
|
# Build cockatrice binary and link it
|
||||||
ADD_EXECUTABLE(cockatrice WIN32 MACOSX_BUNDLE ${cockatrice_SOURCES} ${cockatrice_QM} ${cockatrice_RESOURCES_RCC} ${cockatrice_MOC_SRCS})
|
ADD_EXECUTABLE(cockatrice WIN32 MACOSX_BUNDLE ${cockatrice_SOURCES} ${cockatrice_QM} ${cockatrice_RESOURCES_RCC} ${cockatrice_MOC_SRCS})
|
||||||
|
|
||||||
if(MSVC)
|
TARGET_LINK_LIBRARIES(cockatrice cockatrice_common)
|
||||||
TARGET_LINK_LIBRARIES(cockatrice cockatrice_common Qt5::WinMain)
|
|
||||||
else()
|
|
||||||
TARGET_LINK_LIBRARIES(cockatrice cockatrice_common)
|
|
||||||
endif()
|
|
||||||
qt5_use_modules(cockatrice ${COCKATRICE_LIBS})
|
qt5_use_modules(cockatrice ${COCKATRICE_LIBS})
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
|
|
|
@ -111,9 +111,6 @@ ENDIF()
|
||||||
# Build oracle binary and link it
|
# Build oracle binary and link it
|
||||||
ADD_EXECUTABLE(oracle WIN32 MACOSX_BUNDLE ${oracle_SOURCES} ${oracle_QM} ${oracle_RESOURCES_RCC} ${oracle_MOC_SRCS})
|
ADD_EXECUTABLE(oracle WIN32 MACOSX_BUNDLE ${oracle_SOURCES} ${oracle_QM} ${oracle_RESOURCES_RCC} ${oracle_MOC_SRCS})
|
||||||
|
|
||||||
if(MSVC)
|
|
||||||
TARGET_LINK_LIBRARIES(oracle Qt5::WinMain)
|
|
||||||
endif()
|
|
||||||
qt5_use_modules(oracle ${ORACLE_LIBS})
|
qt5_use_modules(oracle ${ORACLE_LIBS})
|
||||||
|
|
||||||
IF(ZLIB_FOUND)
|
IF(ZLIB_FOUND)
|
||||||
|
|
|
@ -109,11 +109,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
# Build servatrice binary and link it
|
# Build servatrice binary and link it
|
||||||
ADD_EXECUTABLE(servatrice MACOSX_BUNDLE ${servatrice_SOURCES} ${servatrice_RESOURCES_RCC} ${servatrice_MOC_SRCS})
|
ADD_EXECUTABLE(servatrice MACOSX_BUNDLE ${servatrice_SOURCES} ${servatrice_RESOURCES_RCC} ${servatrice_MOC_SRCS})
|
||||||
|
|
||||||
if(MSVC)
|
TARGET_LINK_LIBRARIES(servatrice cockatrice_common ${CMAKE_THREAD_LIBS_INIT})
|
||||||
TARGET_LINK_LIBRARIES(servatrice cockatrice_common ${CMAKE_THREAD_LIBS_INIT} Qt5::WinMain)
|
|
||||||
else()
|
|
||||||
TARGET_LINK_LIBRARIES(servatrice cockatrice_common ${CMAKE_THREAD_LIBS_INIT})
|
|
||||||
endif()
|
|
||||||
qt5_use_modules(servatrice ${SERVATRICE_LIBS})
|
qt5_use_modules(servatrice ${SERVATRICE_LIBS})
|
||||||
|
|
||||||
# install rules
|
# install rules
|
||||||
|
|
Loading…
Reference in a new issue