-
Notifications
You must be signed in to change notification settings - Fork 7
/
cppcolormapConfig.cmake
40 lines (35 loc) · 1.19 KB
/
cppcolormapConfig.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# cppcolormap cmake module
#
# This module sets the target:
#
# cppcolormap
#
# In addition, it sets the following variables:
#
# cppcolormap_FOUND - true if cppcolormap found
# cppcolormap_VERSION - cppcolormap's version
# cppcolormap_INCLUDE_DIRS - the directory containing cppcolormap headers
# The following support targets are defined to simplify things:
#
# cppcolormap::compiler_warnings - enable compiler warnings
include(CMakeFindDependencyMacro)
find_dependency(xtensor)
if(NOT TARGET cppcolormap)
include("${CMAKE_CURRENT_LIST_DIR}/cppcolormapTargets.cmake")
get_target_property(cppcolormap_INCLUDE_DIRS cppcolormap INTERFACE_INCLUDE_DIRECTORIES)
endif()
# Define support target "cppcolormap::compiler_warnings"
if(NOT TARGET cppcolormap::compiler_warnings)
add_library(cppcolormap::compiler_warnings INTERFACE IMPORTED)
if(MSVC)
set_property(
TARGET cppcolormap::compiler_warnings
PROPERTY INTERFACE_COMPILE_OPTIONS
/W4)
else()
set_property(
TARGET cppcolormap::compiler_warnings
PROPERTY INTERFACE_COMPILE_OPTIONS
-Wall -Wextra -pedantic -Wno-unknown-pragmas)
endif()
endif()