-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
31 lines (23 loc) · 936 Bytes
/
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
cmake_minimum_required(VERSION 3.15...3.27)
set(CMAKE_CXX_STANDARD 20)
project(
${SKBUILD_PROJECT_NAME}
VERSION ${SKBUILD_PROJECT_VERSION}
LANGUAGES CXX)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_INSTALL_RPATH @loader_path)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(CMAKE_INSTALL_RPATH $ORIGIN)
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_subdirectory(src/swisspair_cpp)
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
find_package(pybind11 CONFIG REQUIRED)
python_add_library(_swisspair MODULE src/bindings.cpp WITH_SOABI)
target_link_libraries(_swisspair PRIVATE pybind11::headers)
target_link_libraries(_swisspair PRIVATE swisspair)
install(TARGETS _swisspair DESTINATION swisspair)
install(TARGETS swisspair DESTINATION swisspair)
install(TARGETS gmpwrap DESTINATION swisspair)
install(TARGETS mincostpmatch DESTINATION swisspair)