diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-01-10 17:27:41 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-01-10 17:27:41 (GMT) |
commit | e994a90cdf664113b443aa93a83b8bed0159d2f3 (patch) | |
tree | c22fa3642fea7126c93186928559b9a65c0c8846 /hl/fortran/src/CMakeLists.txt | |
parent | 7bd06dccb543a35763a967e3f84f3c8d89f0c538 (diff) | |
download | hdf5-e994a90cdf664113b443aa93a83b8bed0159d2f3.zip hdf5-e994a90cdf664113b443aa93a83b8bed0159d2f3.tar.gz hdf5-e994a90cdf664113b443aa93a83b8bed0159d2f3.tar.bz2 |
HDFFV-10385 fix CMAKE_BUILD_TYPE usage
Diffstat (limited to 'hl/fortran/src/CMakeLists.txt')
-rw-r--r-- | hl/fortran/src/CMakeLists.txt | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index b3a0495..cd3559a 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -3,17 +3,10 @@ PROJECT(HDF5_HL_F90_SRC C CXX Fortran) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared") - if (WIN32) - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE}) - else () - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - endif () -endif () -if (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${CMAKE_BUILD_TYPE}) -else () - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE}) endif () +file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/static") +set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE}) #----------------------------------------------------------------------------- # Setup include Directories @@ -41,6 +34,7 @@ set_source_files_properties (${HDF5_HL_F90_C_SRCS} PROPERTIES LANGUAGE C) set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h) add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS}) +target_include_directories(${HDF5_HL_F90_C_LIB_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/static) TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}") @@ -54,6 +48,7 @@ set (install_targets ${HDF5_HL_F90_C_LIB_TARGET}) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS}) + target_include_directories(${HDF5_HL_F90_C_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared) TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIBSH_TARGET}") |