Skip to content

Commit

Permalink
better support for resource less building
Browse files Browse the repository at this point in the history
  • Loading branch information
mhekkel committed Oct 7, 2024
1 parent f30c6fa commit 34fff80
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 34fff80

Please sign in to comment.