-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (26 loc) · 1.16 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.16)
project(
predicates
LANGUAGES C
VERSION 1996.05.18
DESCRIPTION "Adaptive Precision Floating-Point Arithmetic and Fast Robust Predicates for Computational Geometry"
HOMEPAGE_URL "https://www.cs.cmu.edu/~quake/robust.html")
add_library(${PROJECT_NAME} STATIC "${CMAKE_CURRENT_SOURCE_DIR}/predicates.c")
target_include_directories(${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
$<INSTALL_INTERFACE:include>)
target_compile_options(${PROJECT_NAME} PRIVATE $<$<NOT:$<C_COMPILER_ID:MSVC>>:-msse4.2 -Wall -Wextra>
$<$<C_COMPILER_ID:MSVC>:/arch:AVX /W4>)
if(BUILD_TESTING)
add_executable(test test.c)
target_link_libraries(test PRIVATE ${PROJECT_NAME})
endif()
install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}Targets
LIBRARY DESTINATION lib)
install(
EXPORT ${PROJECT_NAME}Targets
NAMESPACE ${PROJECT_NAME}::
FILE ${PROJECT_NAME}Config.cmake
DESTINATION share/${PROJECT_NAME})
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/predicates.h" DESTINATION include/${PROJECT_NAME})