1
0
Fork 0
mirror of https://gitlab.com/niansa/anyproc.git synced 2025-03-06 20:49:24 +01:00
anyproc/CMakeLists.txt
2023-04-29 11:46:07 +02:00

28 lines
824 B
CMake

cmake_minimum_required(VERSION 3.5)
project(anyproc LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(ANYPROC_PYBIND No CACHE BOOL "If python bindings should be build")
add_library(anyproc INTERFACE)
target_include_directories(anyproc INTERFACE include/)
target_link_libraries(anyproc INTERFACE libjustlm)
add_executable(dictionary dictionary.cpp)
target_link_libraries(dictionary PUBLIC anyproc)
add_executable(translator translator.cpp)
target_link_libraries(translator PUBLIC anyproc)
if (ANYPROC_PYBIND)
find_package(Python COMPONENTS Interpreter Development)
find_package(pybind11 CONFIG)
pybind11_add_module(anyproc_py pybind.cpp)
target_link_libraries(anyproc_py PRIVATE anyproc)
endif()
install(TARGETS anyproc
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})