summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-16 17:15:29 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-16 17:15:29 (GMT)
commitec13e5f872108a14b605b6b0e7d6cb7989ec76f8 (patch)
tree620284a6f74d80f505eb0d41778ab594f15ebb21 /src/CMakeLists.txt
parent2277865c6083e9c34369606dfcd3e551af891978 (diff)
downloadhdf5-ec13e5f872108a14b605b6b0e7d6cb7989ec76f8.zip
hdf5-ec13e5f872108a14b605b6b0e7d6cb7989ec76f8.tar.gz
hdf5-ec13e5f872108a14b605b6b0e7d6cb7989ec76f8.tar.bz2
OESS-98 add CMake option to build plugins project within hdf5
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f60d39b..fd864a6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -949,11 +949,11 @@ endif ()
if (HDF5_USE_PREGEN)
set (HDF5_GENERATED_SOURCE_DIR ${HDF5_USE_PREGEN_DIR})
else ()
- set (HDF5_GENERATED_SOURCE_DIR ${HDF5_BINARY_DIR})
+ set (HDF5_GENERATED_SOURCE_DIR ${HDF5_SRC_BINARY_DIR})
endif ()
if (BUILD_SHARED_LIBS)
- file (MAKE_DIRECTORY "${HDF5_BINARY_DIR}/shared")
+ file (MAKE_DIRECTORY "${HDF5_SRC_BINARY_DIR}/shared")
endif ()
if (LOCAL_BATCH_TEST)
@@ -979,7 +979,7 @@ endif ()
if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c)
- target_include_directories (H5detect PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (H5detect PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_definitions(H5detect PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS})
TARGET_C_PROPERTIES (H5detect STATIC)
target_link_libraries (H5detect
@@ -1076,7 +1076,7 @@ if (HDF5_ENABLE_FORMATTERS)
endif ()
add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
-target_include_directories (H5make_libsettings PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (H5make_libsettings PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS})
TARGET_C_PROPERTIES (H5make_libsettings STATIC)
target_link_libraries (H5make_libsettings
@@ -1092,28 +1092,28 @@ if (HDF5_ENABLE_FORMATTERS)
endif ()
add_custom_command (
- OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c
- ${HDF5_BINARY_DIR}/gen_SRCS.stamp2
+ OUTPUT ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c
+ ${HDF5_SRC_BINARY_DIR}/gen_SRCS.stamp2
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5make_libsettings>
- ARGS ${HDF5_BINARY_DIR}/H5lib_settings.c
+ ARGS ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c
COMMAND ${CMAKE_COMMAND}
ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp2
DEPENDS H5make_libsettings
- WORKING_DIRECTORY ${HDF5_BINARY_DIR}
+ WORKING_DIRECTORY ${HDF5_SRC_BINARY_DIR}
)
-set_source_files_properties (${HDF5_BINARY_DIR}/H5lib_settings.c PROPERTIES GENERATED TRUE)
+set_source_files_properties (${HDF5_SRC_BINARY_DIR}/H5lib_settings.c PROPERTIES GENERATED TRUE)
if (BUILD_SHARED_LIBS)
add_custom_command (
- OUTPUT ${HDF5_BINARY_DIR}/shared/H5lib_settings.c
- ${HDF5_BINARY_DIR}/shared/shared_gen_SRCS.stamp2
+ OUTPUT ${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c
+ ${HDF5_SRC_BINARY_DIR}/shared/shared_gen_SRCS.stamp2
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "${HDF5_BINARY_DIR}/H5lib_settings.c" "${HDF5_BINARY_DIR}/shared/H5lib_settings.c"
+ ARGS -E copy_if_different "${HDF5_SRC_BINARY_DIR}/H5lib_settings.c" "${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c"
COMMAND ${CMAKE_COMMAND}
ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp2
- DEPENDS ${HDF5_BINARY_DIR}/H5lib_settings.c
- WORKING_DIRECTORY ${HDF5_BINARY_DIR}
+ DEPENDS ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c
+ WORKING_DIRECTORY ${HDF5_SRC_BINARY_DIR}
)
- set_source_files_properties (${HDF5_BINARY_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE)
+ set_source_files_properties (${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE)
endif ()
## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z"
@@ -1124,13 +1124,13 @@ option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
# Add H5Tinit source to build - generated by H5detect/CMake at configure time
#-----------------------------------------------------------------------------
if (NOT ONLY_SHARED_LIBS)
- set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c)
+ set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c)
add_custom_target (gen_${HDF5_LIB_TARGET} ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp2)
add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${H5_MODULE_HEADERS})
target_include_directories (${HDF5_LIB_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
- INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>;$<BUILD_INTERFACE:${HDF5_BINARY_DIR}>"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>;$<BUILD_INTERFACE:${HDF5_SRC_BINARY_DIR}>"
)
target_compile_options(${HDF5_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(${HDF5_LIB_TARGET}
@@ -1160,14 +1160,14 @@ if (NOT ONLY_SHARED_LIBS)
endif ()
if (BUILD_SHARED_LIBS)
- set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c)
+ set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c)
add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp2)
add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${H5_MODULE_HEADERS})
target_include_directories (${HDF5_LIBSH_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
PUBLIC "$<$<BOOL:${HDF5_ENABLE_HDFS}>:${HDFS_INCLUDE_DIR}>"
- INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>;$<BUILD_INTERFACE:${HDF5_BINARY_DIR}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>;$<BUILD_INTERFACE:${HDF5_SRC_BINARY_DIR}>"
)
target_compile_options(${HDF5_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(${HDF5_LIBSH_TARGET}
@@ -1212,7 +1212,7 @@ if (NOT HDF5_INSTALL_NO_DEVELOPMENT)
FILES
${H5_PUBLIC_HEADERS}
${H5_PUBLIC_GENERATED_HEADERS}
- ${HDF5_BINARY_DIR}/H5pubconf.h
+ ${HDF5_SRC_BINARY_DIR}/H5pubconf.h
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT