cmake: Don't enforce Clang submodule requirement

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2020-02-13 05:21:06 +01:00
parent 53d4ad31e6
commit 7821bc1ab3

View file

@ -69,7 +69,10 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/clang" "${CMAKE_CURRENT
# CMake Modules # CMake Modules
include("util") include("util")
include("Clang") if (EXISTS "${CMAKE_SOURCE_DIR}/cmake/Clang/Clang.cmake")
include("Clang")
set(HAVE_CLANG ON)
endif()
# Detect Build Type # Detect Build Type
if("${CMAKE_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}") if("${CMAKE_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
@ -523,11 +526,13 @@ add_library(${PROJECT_NAME} MODULE
) )
# Clang-Format # Clang-Format
clang_format( if(HAVE_CLANG)
TARGETS ${PROJECT_NAME} clang_format(
DEPENDENCY TARGETS ${PROJECT_NAME}
VERSION 9.0.0 DEPENDENCY
) VERSION 9.0.0
)
endif()
# Include Directories # Include Directories
target_include_directories(${PROJECT_NAME} target_include_directories(${PROJECT_NAME}