diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f7e794a..bed8a13d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,7 +182,7 @@ else() set (LIBCRYPTO_VERSION "1.1.1") endif() else() - include(${CMAKE_SOURCE_DIR}/cmake/openssl.cmake) + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/openssl.cmake) find_libcrypto() endif() if(NOT BUILD_ONLY_LIB) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index bd387141..df17e071 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -14,7 +14,7 @@ # limitations under the License. # -include(${CMAKE_SOURCE_DIR}/cmake/openssl.cmake) +include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/openssl.cmake) find_libcrypto() if(MSVC) @@ -146,7 +146,7 @@ if(ENABLE_STATIC) endif(ENABLE_STATIC) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yubihsm.pc.in ${CMAKE_CURRENT_BINARY_DIR}/yubihsm.pc @ONLY) -configure_file(${CMAKE_SOURCE_DIR}/common/platform-config.h.in ${CMAKE_SOURCE_DIR}/common/platform-config.h @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../common/platform-config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/../common/platform-config.h @ONLY) if(WIN32) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY)