Commit abd9fdfa by Maarten L. Hekkelman

fix makefile

parent 57560472
...@@ -98,7 +98,7 @@ set(THREADS_PREFER_PTHREAD_FLAG) ...@@ -98,7 +98,7 @@ set(THREADS_PREFER_PTHREAD_FLAG)
find_package(Threads) find_package(Threads)
find_package(libmcfp QUIET) find_package(libmcfp QUIET)
if(NOT libmcfp_FOUND) if(NOT (libmcfp_FOUND OR TARGET libmcfp))
include(FetchContent) include(FetchContent)
if(CMAKE_VERSION GREATER_EQUAL 3.28) if(CMAKE_VERSION GREATER_EQUAL 3.28)
...@@ -114,19 +114,21 @@ if(NOT libmcfp_FOUND) ...@@ -114,19 +114,21 @@ if(NOT libmcfp_FOUND)
FetchContent_MakeAvailable(libmcfp) FetchContent_MakeAvailable(libmcfp)
endif() endif()
find_package(cifpp 7 QUIET) if(NOT TARGET cifpp AND NOT cifpp_FOUND)
find_package(cifpp 7 QUIET)
if(NOT cifpp_FOUND) if(NOT cifpp_FOUND)
set(CIFPP_DOWNLOAD_CCD OFF) set(CIFPP_DOWNLOAD_CCD OFF)
FetchContent_Declare( FetchContent_Declare(
cifpp cifpp
${EXLC} ${EXLC}
GIT_REPOSITORY https://github.com/pdb-redo/libcifpp.git GIT_REPOSITORY https://github.com/pdb-redo/libcifpp.git
GIT_TAG v7.0.3 GIT_TAG v7.0.3
) )
FetchContent_MakeAvailable(cifpp) FetchContent_MakeAvailable(cifpp)
endif()
endif() endif()
add_subdirectory(libdssp) add_subdirectory(libdssp)
......
...@@ -157,7 +157,7 @@ void writeDSSP(const dssp &dssp, std::ostream &os) ...@@ -157,7 +157,7 @@ void writeDSSP(const dssp &dssp, std::ostream &os)
std::time_t today = system_clock::to_time_t(system_clock::now()); std::time_t today = system_clock::to_time_t(system_clock::now());
std::tm *tm = std::gmtime(&today); std::tm *tm = std::gmtime(&today);
std::string version = kVersionNumber; std::string version = klibdsspVersionNumber;
if (version.length() < 10) if (version.length() < 10)
version.insert(version.end(), 10 - version.length(), ' '); version.insert(version.end(), 10 - version.length(), ' ');
...@@ -877,8 +877,8 @@ void annotateDSSP(cif::datablock &db, const dssp &dssp, bool writeOther, bool wr ...@@ -877,8 +877,8 @@ void annotateDSSP(cif::datablock &db, const dssp &dssp, bool writeOther, bool wr
software.emplace({ software.emplace({
{ "pdbx_ordinal", software.get_unique_id("") }, { "pdbx_ordinal", software.get_unique_id("") },
{ "name", "dssp" }, { "name", "dssp" },
{ "version", kVersionNumber }, { "version", klibdsspVersionNumber },
{ "date", kRevisionDate }, { "date", klibdsspRevisionDate },
{ "classification", "model annotation" } { "classification", "model annotation" }
}); });
} }
find_package(Catch2 QUIET) if(NOT(Catch2_FOUND OR TARGET Catch2))
find_package(Catch2 QUIET)
if(NOT Catch2_FOUND) if(NOT Catch2_FOUND)
include(FetchContent) include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
Catch2 Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.13.9) GIT_TAG v2.13.9)
FetchContent_MakeAvailable(Catch2) FetchContent_MakeAvailable(Catch2)
set(Catch2_VERSION "2.13.9") set(Catch2_VERSION "2.13.9")
endif()
endif() endif()
add_executable(unit-test-dssp ${CMAKE_CURRENT_SOURCE_DIR}/unit-test-dssp.cpp ${PROJECT_SOURCE_DIR}/libdssp/src/dssp-io.cpp) add_executable(unit-test-dssp ${CMAKE_CURRENT_SOURCE_DIR}/unit-test-dssp.cpp ${PROJECT_SOURCE_DIR}/libdssp/src/dssp-io.cpp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment