forked from pradeep-pyro/tinynurbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (31 loc) · 1.23 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
cmake_minimum_required(VERSION 3.5)
project(tinynurbs LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")
set(BUILD_TESTS ON CACHE BOOL "Build unit tests")
set(GLM_ROOT_DIR "" CACHE STRING "Root directory of GLM (>=0.9.9)")
message(STATUS "Variable from cache: ${GLM_ROOT_DIR}")
find_package(GLM 0.9.9 REQUIRED MODULE)
set(HEADER_FILES
include/tinynurbs/tinynurbs.h
include/tinynurbs/core/basis.h
include/tinynurbs/core/check.h
include/tinynurbs/core/curve.h
include/tinynurbs/core/evaluate.h
include/tinynurbs/core/modify.h
include/tinynurbs/core/surface.h
include/tinynurbs/io/obj.h
include/tinynurbs/util/util.h
include/tinynurbs/util/array2.h
)
source_group("Header Files" FILES ${HEADER_FILES})
source_group("CMake Files" FILES CMakeLists.txt)
add_library(tinynurbs INTERFACE)
add_library(tinynurbs::tinynurbs ALIAS tinynurbs )
target_link_libraries(tinynurbs INTERFACE glm)
target_include_directories(tinynurbs INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
add_custom_target(tinynurbs_dummy SOURCES ${HEADER_FILES} CMakeLists.txt)
if(BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()