CMake: Provide proper interface targets from dependencies

* to make use of cmakes inherited link dependencies which
  imports all include directories/ definitions from the link library

(cherry picked from commit 1a572d2425)
This commit is contained in:
Naios
2016-03-14 15:27:33 +01:00
parent fee9bb904a
commit b0ac332d58
27 changed files with 492 additions and 226 deletions

View File

@@ -8,11 +8,13 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# We require CMake >= 3.0
cmake_minimum_required(VERSION 3.0)
# Set projectname (must be done AFTER setting configurationtypes)
project(TrinityCore)
# CMake policies (can not be handled elsewhere)
cmake_minimum_required(VERSION 2.8.9)
cmake_policy(SET CMP0005 OLD)
if(POLICY CMP0043)
cmake_policy(SET CMP0043 OLD) # Disable 'Ignore COMPILE_DEFINITIONS_<Config> properties'
@@ -22,6 +24,9 @@ endif(POLICY CMP0043)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
# build static libraries
set(BUILD_SHARED_LIBS OFF)
# Set RPATH-handing (CMake parameters)
set(CMAKE_SKIP_BUILD_RPATH 0)
set(CMAKE_BUILD_WITH_INSTALL_RPATH 0)
@@ -52,22 +57,9 @@ include(CheckPlatform)
include(GroupSources)
# basic packagesearching and setup (further support will be needed, this is a preliminary release!)
set(OPENSSL_EXPECTED_VERSION 1.0.0)
find_package(PCHSupport)
find_package(OpenSSL REQUIRED)
find_package(Threads REQUIRED)
find_package(MySQL)
include(ConfigureBoost)
if( UNIX )
find_package(Readline)
find_package(ZLIB)
find_package(BZip2)
endif()
if(NOT WITHOUT_GIT)
find_package(Git)
endif()