From a525ff40c113a2069c83cbed631c0e14ca7b71e4 Mon Sep 17 00:00:00 2001 From: Conrad Poelman Date: Sat, 14 Dec 2024 21:42:10 -0500 Subject: [PATCH] Update CMakeLists.txt to allow building tools before install step has been run The INTERFACE include directory $/include only gets populated after the install step has been performed. Adding ${CMAKE_CURRENT_LIST_DIR} enables developers on a fresh build to build HDF5 and the libraries and tools in one go. --- tools/lib/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index a831ed52050..df6eaabb214 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -38,7 +38,7 @@ if (BUILD_STATIC_LIBS) add_library (${HDF5_TOOLS_LIB_TARGET} STATIC ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS}) target_include_directories (${HDF5_TOOLS_LIB_TARGET} PRIVATE "${HDF5_TOOLS_LIB_SOURCE_DIR};${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" - INTERFACE "$/include>" + INTERFACE "$/include>" ${CMAKE_CURRENT_LIST_DIR} ) target_compile_options(${HDF5_TOOLS_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}") #target_compile_definitions(${HDF5_TOOLS_LIB_TARGET} PRIVATE H5_TOOLS_DEBUG) @@ -58,7 +58,7 @@ if (BUILD_SHARED_LIBS) add_library (${HDF5_TOOLS_LIBSH_TARGET} SHARED ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS}) target_include_directories (${HDF5_TOOLS_LIBSH_TARGET} PRIVATE "${HDF5_TOOLS_LIB_SOURCE_DIR};${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" - INTERFACE "$/include>" + INTERFACE "$/include>" ${CMAKE_CURRENT_LIST_DIR} ) target_compile_options(${HDF5_TOOLS_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}") target_compile_definitions(${HDF5_TOOLS_LIBSH_TARGET}