cmake: Fix Clang toolset support

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2020-07-27 08:22:07 +02:00 committed by Michael Fabian Dirks
parent bbfacbc30b
commit 2ac306aa31

View file

@ -74,24 +74,24 @@ set(PROJECT_COPYRIGHT_YEARS "2018 - 2020")
# Setup / Bootstrap # Setup / Bootstrap
################################################################################ ################################################################################
# Detect Build Type
if("${CMAKE_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
set(PropertyPrefix "")
else()
set(PropertyPrefix "${PROJECT_NAME}_")
endif()
# Search Path # Search Path
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/clang" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" "${CMAKE_CURRENT_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/clang" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# CMake Modules # CMake Modules
include("util") include("util")
## Clang Integration ## Clang Integration
if(${PropertyPrefix}ENABLE_CLANG AND (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Clang/Clang.cmake")) if(${PropertyPrefix}ENABLE_CLANG AND (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/clang/Clang.cmake"))
include("Clang") include("Clang")
set(HAVE_CLANG ON) set(HAVE_CLANG ON)
endif() endif()
# Detect Build Type
if("${CMAKE_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
set(PropertyPrefix "")
else()
set(PropertyPrefix "${PROJECT_NAME}_")
endif()
# Detect Architecture # Detect Architecture
math(EXPR BITS "8*${CMAKE_SIZEOF_VOID_P}") math(EXPR BITS "8*${CMAKE_SIZEOF_VOID_P}")
if("${BITS}" STREQUAL "32") if("${BITS}" STREQUAL "32")