Skip to content

Commit 8c7c25c

Browse files
committed
Take more robustness to cmake scripts.
1 parent 7c1dbf5 commit 8c7c25c

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,5 @@ es_make_install_package(
8282
TARGETS ${ES_PACKAGING_TARGETS}
8383
PACKAGE_NAME CppEssence
8484
VERSION ${ES_PROJECT_VERSION}
85+
PATH_VARS CMAKE_INSTALL_PREFIX
8586
)

CppEssenceConfig.cmake.in

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,20 @@ include(CMakeFindDependencyMacro)
55
find_dependency(
66
nlohmann_json
77
REQUIRED
8-
HINTS @ES_THIRD_PARTY_INSTALL_DIR@
8+
HINTS "@ES_THIRD_PARTY_INSTALL_DIR@"
99
NO_DEFAULT_PATH
1010
)
1111

1212
find_dependency(
1313
spdlog
1414
REQUIRED
15-
HINTS @ES_THIRD_PARTY_INSTALL_DIR@
15+
HINTS "@ES_THIRD_PARTY_INSTALL_DIR@"
1616
NO_DEFAULT_PATH
1717
)
1818

1919
set(OPENSSL_ROOT_DIR "@OPENSSL_ROOT_DIR@")
20+
find_dependency(OpenSSL REQUIRED)
2021

21-
find_dependency(
22-
OpenSSL
23-
REQUIRED
24-
)
25-
26-
list(APPEND CMAKE_MODULE_PATH @PACKAGE_CMAKE_INSTALL_PREFIX@/cmake)
22+
list(APPEND CMAKE_MODULE_PATH "@PACKAGE_CMAKE_INSTALL_PREFIX@/cmake")
2723

2824
include("${CMAKE_CURRENT_LIST_DIR}/CppEssenceTargets.cmake")

0 commit comments

Comments
 (0)