forked from DamCB/tyssue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
40 lines (27 loc) · 1.21 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
cmake_minimum_required(VERSION 3.15...3.26)
project(${SKBUILD_PROJECT_NAME} LANGUAGES CXX)
message(STATUS '${SKBUILD_PROJECT_NAME}')
set(CMAKE_VERBOSE_MAKEFILE ON)
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
find_package(Python COMPONENTS Interpreter Development.Embed REQUIRED)
set(PYBIND11_FINDPYTHON ON)
find_package(pybind11 CONFIG REQUIRED)
# Some screen output
message(STATUS "OS detected: ${CMAKE_SYSTEM_NAME}")
message(STATUS "CXX Compiler detected: ${CMAKE_CXX_COMPILER_ID}")
message(STATUS "CMake additional search path for libraries: ${CMAKE_LIBRARY_PATH}")
# CGAL and its components
find_package(CGAL)
message(STATUS "CGAL version: ${CGAL_VERSION}")
if (NOT CGAL_FOUND)
message(STATUS "This project requires the CGAL library, and will not be compiled.")
return()
endif()
# include helper file
include( ${CGAL_USE_FILE})
message(STATUS "CGAL_USE_FILE: ${CGAL_USE_FILE}")
set (CPP_SRC "src/tyssue_cpp/")
pybind11_add_module(_mesh_generation MODULE "${CPP_SRC}/mesh_generation.cpp" )
install(TARGETS _mesh_generation DESTINATION ${SKBUILD_PROJECT_NAME})
pybind11_add_module(_collisions SHARED "${CPP_SRC}/c_collisions.cpp" )
install(TARGETS _collisions DESTINATION ${SKBUILD_PROJECT_NAME})