forked from sideeffects/WindingNumber
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
56 lines (46 loc) · 1.5 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
CMAKE_MINIMUM_REQUIRED(VERSION 3.9.6)
PROJECT(FastWindingNumber)
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
IF (NOT TBB_FOUND)
FIND_PACKAGE(TBB REQUIRED)
ADD_LIBRARY(TBB::tbb INTERFACE IMPORTED)
TARGET_INCLUDE_DIRECTORIES(TBB::tbb SYSTEM INTERFACE ${TBB_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(TBB::tbb INTERFACE
${TBB_LIBRARIES})
ADD_LIBRARY(TBB::tbbmalloc INTERFACE IMPORTED)
TARGET_INCLUDE_DIRECTORIES(TBB::tbbmalloc SYSTEM INTERFACE
${TBB_MALLOC_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(TBB::tbbmalloc INTERFACE
${TBB_MALLOC_LIBRARIES})
ADD_LIBRARY(TBB::tbbmalloc_proxy INTERFACE IMPORTED)
TARGET_INCLUDE_DIRECTORIES(TBB::tbbmalloc_proxy SYSTEM INTERFACE
${TBB_MALLOC_PROXY_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(TBB::tbbmalloc_proxy INTERFACE
${TBB_MALLOC_PROXY_LIBRARIES})
ENDIF (NOT TBB_FOUND)
SET(SRC_FILES
UT_Array.cpp
UT_SolidAngle.cpp)
SET(INC_FILES
SYS_Math.h
SYS_Types.h
UT_Array.h
UT_ArrayImpl.h
UT_BVH.h
UT_BVHImpl.h
UT_FixedVector.h
UT_ParallelUtil.h
UT_SmallArray.h
UT_SolidAngle.h
VM_SIMD.h
VM_SSEFunc.h)
ADD_LIBRARY(FastWindingNumber SHARED ${SRC_FILES} ${INC_FILES})
TARGET_LINK_LIBRARIES(FastWindingNumber PUBLIC TBB::tbb TBB::tbbmalloc)
ADD_SUBDIRECTORY(tests EXCLUDE_FROM_ALL)
INSTALL(TARGETS FastWindingNumber
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
INSTALL(FILES ${INC_FILES}
DESTINATION include/FastWindingNumber)