2018-12-08 20:10:29 +05:00
|
|
|
|
2019-01-03 19:54:50 +05:00
|
|
|
add_library(ngcore SHARED archive.cpp logging.cpp paje_trace.cpp utils.cpp profiler.cpp)
|
2018-12-28 17:43:15 +05:00
|
|
|
|
|
|
|
target_compile_definitions(ngcore PRIVATE NGCORE_EXPORTS)
|
|
|
|
if(NOT WIN32)
|
|
|
|
target_compile_options(ngcore PRIVATE -fvisibility=hidden)
|
|
|
|
endif(NOT WIN32)
|
|
|
|
|
2019-01-02 20:30:55 +05:00
|
|
|
target_compile_definitions(ngcore PUBLIC $<$<CONFIG:DEBUG>:NETGEN_ENABLE_CHECK_RANGE>)
|
|
|
|
|
|
|
|
if(CHECK_RANGE)
|
|
|
|
target_compile_definitions(ngcore PUBLIC NETGEN_ENABLE_CHECK_RANGE)
|
|
|
|
endif(CHECK_RANGE)
|
|
|
|
|
2018-12-28 17:43:15 +05:00
|
|
|
if(USE_SPDLOG)
|
|
|
|
include_directories(${SPDLOG_INCLUDE_DIR})
|
|
|
|
install(DIRECTORY ${SPDLOG_INCLUDE_DIR}
|
|
|
|
DESTINATION ${NG_INSTALL_DIR_INCLUDE}
|
|
|
|
)
|
|
|
|
add_dependencies(ngcore project_spdlog)
|
|
|
|
target_compile_definitions(ngcore PUBLIC NETGEN_USE_SPDLOG)
|
|
|
|
if(DEBUG_LOG)
|
|
|
|
target_compile_definitions(ngcore PUBLIC NETGEN_LOG_DEBUG)
|
|
|
|
endif(DEBUG_LOG)
|
|
|
|
endif(USE_SPDLOG)
|
2018-11-29 22:35:30 +05:00
|
|
|
|
2018-12-03 20:28:04 +05:00
|
|
|
install(TARGETS ngcore DESTINATION ${NG_INSTALL_DIR} COMPONENT netgen)
|
|
|
|
|
2018-12-21 20:03:44 +05:00
|
|
|
if(USE_PYTHON)
|
2018-12-28 17:43:15 +05:00
|
|
|
target_compile_definitions(ngcore PUBLIC NETGEN_PYTHON)
|
2019-03-26 15:06:59 +05:00
|
|
|
target_include_directories(ngcore PRIVATE ${PYTHON_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(ngcore PRIVATE ${PYTHON_LIBRARIES})
|
2018-12-21 20:03:44 +05:00
|
|
|
endif(USE_PYTHON)
|
|
|
|
|
2018-12-28 17:43:15 +05:00
|
|
|
install(FILES ngcore.hpp archive.hpp type_traits.hpp version.hpp ngcore_api.hpp logging.hpp
|
2019-02-12 00:01:07 +05:00
|
|
|
exception.hpp symboltable.hpp paje_trace.hpp utils.hpp profiler.hpp mpi_wrapper.hpp
|
2018-12-08 20:10:29 +05:00
|
|
|
DESTINATION ${NG_INSTALL_DIR_INCLUDE}/core COMPONENT netgen_devel)
|
|
|
|
|
|
|
|
if(ENABLE_CPP_CORE_GUIDELINES_CHECK)
|
|
|
|
set_target_properties(ngcore PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}")
|
|
|
|
endif(ENABLE_CPP_CORE_GUIDELINES_CHECK)
|
2018-12-28 17:43:15 +05:00
|
|
|
|
|
|
|
if(USE_PYTHON)
|
|
|
|
pybind11_add_module(pyngcore SHARED python_ngcore.cpp)
|
2019-01-08 17:12:12 +05:00
|
|
|
target_link_libraries(pyngcore PUBLIC ngcore ${PYTHON_LIBRARIES})
|
2018-12-28 17:43:15 +05:00
|
|
|
set_target_properties(pyngcore PROPERTIES INSTALL_RPATH "${NG_RPATH_TOKEN}/${NETGEN_PYTHON_RPATH}")
|
|
|
|
install(TARGETS pyngcore DESTINATION ${NG_INSTALL_DIR_PYTHON} COMPONENT netgen)
|
|
|
|
endif(USE_PYTHON)
|
|
|
|
|