option(CIFPP_DOWNLOAD_CCD "Download the CCD file components.cif during installation" ON)
option(CIFPP_DOWNLOAD_CCD "Download the CCD file components.cif during installation" ON)
# An optional cron script can be installed to keep the data files up-to-date
# An optional cron script can be installed to keep the data files up-to-date
if(UNIX)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.22)
cmake_dependent_option(CIFPP_INSTALL_UPDATE_SCRIPT "Install the script to update CCD and dictionary files" ON "NOT ${CMAKE_SYSTEM_NAME} STREQUAL \"Linux\"" OFF)
else()
option(CIFPP_INSTALL_UPDATE_SCRIPT "Install the script to update CCD and dictionary files" ON)
option(CIFPP_INSTALL_UPDATE_SCRIPT "Install the script to update CCD and dictionary files" ON)
endif()
endif()
...
@@ -94,10 +96,9 @@ if(BUILD_FOR_CCP4)
...
@@ -94,10 +96,9 @@ if(BUILD_FOR_CCP4)
if("$ENV{CCP4}" STREQUAL "" OR NOT EXISTS $ENV{CCP4})
if("$ENV{CCP4}" STREQUAL "" OR NOT EXISTS $ENV{CCP4})
message(FATAL_ERROR "A CCP4 built was requested but CCP4 was not sourced")
message(FATAL_ERROR "A CCP4 built was requested but CCP4 was not sourced")
set(CIFPP_DATA_DIR "${CMAKE_INSTALL_FULL_DATADIR}/libcifpp" CACHE PATH "The directory where dictionary files are stored")
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.22)
cmake_dependent_option(CIFPP_DATA_DIR "Directory where dictionary and other static data is stored" CACHE PATH "BUILD_FOR_CCP4""$ENV{CCP4}/share/libcifpp")
else()
option(CIFPP_DATA_DIR "Directory where dictionary and other static data is stored" PATH)
endif()
target_compile_definitions(cifpp PUBLIC DATA_DIR="${CIFPP_DATA_DIR}")
target_compile_definitions(cifpp PUBLIC DATA_DIR="${CIFPP_DATA_DIR}")