diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-10-16 16:09:02 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-10-16 16:09:02 (GMT) |
commit | 72f5f74b67f72364b9c5b23e9d0c3ad69b1eb19b (patch) | |
tree | 8a9153cb16930982a2d56bb7f0918fb1b89e583d /src/CMakeLists.txt | |
parent | ee5662650911ef3eded80ccc6c1748e74e045353 (diff) | |
download | hdf5-72f5f74b67f72364b9c5b23e9d0c3ad69b1eb19b.zip hdf5-72f5f74b67f72364b9c5b23e9d0c3ad69b1eb19b.tar.gz hdf5-72f5f74b67f72364b9c5b23e9d0c3ad69b1eb19b.tar.bz2 |
OESS-98 add CMake option to build plugins project within hdf5
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1458665..597f620 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1012,11 +1012,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) @@ -1042,7 +1042,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 @@ -1139,7 +1139,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 @@ -1155,28 +1155,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" @@ -1187,13 +1187,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} @@ -1223,14 +1223,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} @@ -1275,7 +1275,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 |