From 34fff80687d1c9ee9749ba748a269237e35ed077 Mon Sep 17 00:00:00 2001 From: "Maarten L. Hekkelman" Date: Mon, 7 Oct 2024 11:26:28 +0200 Subject: [PATCH] better support for resource less building --- CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 614fa67..da0a0b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,8 @@ if(NOT (libmcfp_FOUND OR TARGET libmcfp)) endif() if(NOT TARGET cifpp AND NOT cifpp_FOUND) + include(FetchContent) + find_package(cifpp 7 QUIET) if(NOT cifpp_FOUND) @@ -149,6 +151,22 @@ install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin ) +if(NOT USE_RSRC) + # When building cifpp ourselves, we need to find where libcifpp + # expects the data files to be located. + if(TARGET cifpp) + get_target_property(DSSP_DATA_DIR cifpp CIFPP_DATA_DIR) + + install( + FILES ${CIFPP_SHARE_DIR}/mmcif_pdbx.dic + ${CIFPP_SHARE_DIR}/mmcif_ddl.dic + ${CMAKE_CURRENT_SOURCE_DIR}/libdssp/mmcif_pdbx/dssp-extension.dic + DESTINATION ${DSSP_DATA_DIR}) + else() + + endif() +endif() + if(BUILD_DOCUMENTATION) add_subdirectory(doc) endif()