Commit abd9fdfa by Maarten L. Hekkelman

fix makefile

parent 57560472
......@@ -98,7 +98,7 @@ set(THREADS_PREFER_PTHREAD_FLAG)
find_package(Threads)
find_package(libmcfp QUIET)
if(NOT libmcfp_FOUND)
if(NOT (libmcfp_FOUND OR TARGET libmcfp))
include(FetchContent)
if(CMAKE_VERSION GREATER_EQUAL 3.28)
......@@ -114,9 +114,10 @@ if(NOT libmcfp_FOUND)
FetchContent_MakeAvailable(libmcfp)
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)
FetchContent_Declare(
......@@ -127,6 +128,7 @@ if(NOT cifpp_FOUND)
)
FetchContent_MakeAvailable(cifpp)
endif()
endif()
add_subdirectory(libdssp)
......
......@@ -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::tm *tm = std::gmtime(&today);
std::string version = kVersionNumber;
std::string version = klibdsspVersionNumber;
if (version.length() < 10)
version.insert(version.end(), 10 - version.length(), ' ');
......@@ -877,8 +877,8 @@ void annotateDSSP(cif::datablock &db, const dssp &dssp, bool writeOther, bool wr
software.emplace({
{ "pdbx_ordinal", software.get_unique_id("") },
{ "name", "dssp" },
{ "version", kVersionNumber },
{ "date", kRevisionDate },
{ "version", klibdsspVersionNumber },
{ "date", klibdsspRevisionDate },
{ "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)
FetchContent_Declare(
......@@ -11,6 +12,7 @@ if(NOT Catch2_FOUND)
FetchContent_MakeAvailable(Catch2)
set(Catch2_VERSION "2.13.9")
endif()
endif()
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