summaryrefslogtreecommitdiffstats
path: root/hl/c++
diff options
context:
space:
mode:
Diffstat (limited to 'hl/c++')
-rw-r--r--hl/c++/examples/CMakeLists.txt7
-rw-r--r--hl/c++/src/CMakeLists.txt4
-rw-r--r--hl/c++/test/CMakeLists.txt15
3 files changed, 4 insertions, 22 deletions
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index 25158f2..7f0d422 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -1,16 +1,11 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_CPP_EXAMPLES)
-#-----------------------------------------------------------------------------
-# Setup include Directories
-#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src)
-INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src)
-
# --------------------------------------------------------------------
# Add in the examples for the Packet Table codes
# --------------------------------------------------------------------
add_executable (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp)
+set_property(TARGET ptExampleFL APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (ptExampleFL STATIC " " " ")
target_link_libraries (
ptExampleFL
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index bfafe7f..53194d0 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -4,13 +4,12 @@ PROJECT (HDF5_HL_CPP_SRC)
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src)
-INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_SOURCE_DIR})
set (HDF5_HL_CPP_SOURCES ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp)
set (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h)
add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SOURCES})
+set_property(TARGET ${HDF5_HL_CPP_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_HL_CPP_LIB_TARGET} PUBLIC ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}")
@@ -23,6 +22,7 @@ set (install_targets ${HDF5_HL_CPP_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_HL_CPP_LIBSH_TARGET} SHARED ${HDF5_HL_CPP_SOURCES})
+ set_property(TARGET ${HDF5_HL_CPP_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_HL_CPP_LIBSH_TARGET} PUBLIC ${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIBSH_TARGET}")
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index b48d147..aab3049 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -1,21 +1,8 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_CPP_TEST)
-#-----------------------------------------------------------------------------
-# Setup include Directories
-#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src)
-INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/c++/src)
-
-# --------------------------------------------------------------------
-# Add in the unit tests for the packet table c++ wrapper
-# --------------------------------------------------------------------
-
-INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
-INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/test)
-INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src)
-
add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
+set_property(TARGET hl_ptableTest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_HL_SRC_DIR}/test;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (hl_ptableTest STATIC " " " ")
target_link_libraries (
hl_ptableTest