Skip to content

Commit 3786b88

Browse files
authored
Update cmake config for usage as external package (#45)
1 parent fb42d90 commit 3786b88

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ target_link_options(HydroChrono BEFORE
137137
${CHRONO_LINKER_FLAGS}
138138
)
139139
140+
set_target_properties(HydroChrono
141+
PROPERTIES
142+
POSITION_INDEPENDENT_CODE ON
143+
)
144+
140145
# temporary hack
141146
# seems there is no namespace target hdf5:: on linux
142147
# for HDF5 version 1.10 to 1.14 ?
@@ -283,4 +288,4 @@ export(
283288
# ================
284289
# Documentation
285290
# ================
286-
add_subdirectory(doc)
291+
add_subdirectory(doc)

cmake/HydroChronoConfig.cmake.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@PACKAGE_INIT@
22

33
include(CMakeFindDependencyMacro)
4-
find_dependency(HDF5)
5-
find_dependency(Chrono)
4+
find_dependency(HDF5 NAMES hdf5 COMPONENTS CXX)
5+
find_dependency(Chrono CONFIG REQUIRED)
66

7-
include("${CMAKE_CURRENT_LIST_DIR}/HydroChronoTargets.cmake")
7+
include("${CMAKE_CURRENT_LIST_DIR}/HydroChronoTargets.cmake")

0 commit comments

Comments
 (0)