Commit 2baf702e by Maarten L. Hekkelman

fix for meta project

parent ff306934
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this # 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer # list of conditions and the following disclaimer
# 2. Redistributions in binary form must reproduce the above copyright notice, # 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation # this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution. # and/or other materials provided with the distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
...@@ -103,7 +103,9 @@ set(CMAKE_THREAD_PREFER_PTHREAD) ...@@ -103,7 +103,9 @@ set(CMAKE_THREAD_PREFER_PTHREAD)
set(THREADS_PREFER_PTHREAD_FLAG) set(THREADS_PREFER_PTHREAD_FLAG)
find_package(Threads) find_package(Threads)
find_package(cifpp 5.0.0 REQUIRED) if(NOT PDB_REDO_META)
find_package(cifpp 5.0.0 REQUIRED)
endif()
# The DSSP code is in a separate library, optionally to be used by others # The DSSP code is in a separate library, optionally to be used by others
add_library(dssp_library OBJECT ${PROJECT_SOURCE_DIR}/src/DSSP.cpp) add_library(dssp_library OBJECT ${PROJECT_SOURCE_DIR}/src/DSSP.cpp)
......
cmake_minimum_required(VERSION 3.19) cmake_minimum_required(VERSION 3.16..3.19)
function(add_git_submodule dir) function(add_git_submodule dir)
# add a Git submodule directory to CMake, assuming the # add a Git submodule directory to CMake, assuming the
...@@ -11,9 +11,14 @@ function(add_git_submodule dir) ...@@ -11,9 +11,14 @@ function(add_git_submodule dir)
find_package(Git REQUIRED) find_package(Git REQUIRED)
if(NOT EXISTS ${dir}/CMakeLists.txt) if(NOT EXISTS ${dir}/CMakeLists.txt)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive -- ${dir} if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.19)
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive -- ${dir}
COMMAND_ERROR_IS_FATAL ANY) WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMAND_ERROR_IS_FATAL ANY)
else()
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive -- ${dir}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
endif()
endif() endif()
set(ENABLE_TESTING OFF) set(ENABLE_TESTING OFF)
......
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