summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/CMakeLists.txt24
1 files changed, 12 insertions, 12 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 35b47a5..c93e943 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -64,7 +64,7 @@ if (BUILD_SHARED_LIBS)
file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared")
set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE})
endif ()
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static")
set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
endif ()
@@ -83,7 +83,7 @@ add_custom_command (TARGET H5match_types POST_BUILD
DEPENDS H5match_types
)
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
add_custom_command (TARGET H5match_types POST_BUILD
BYPRODUCTS ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
COMMAND ${CMAKE_COMMAND}
@@ -139,7 +139,7 @@ set (f90CStub_C_HDRS
${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h
)
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
set (f90CStub_CGEN_HDRS
# generated files
${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
@@ -159,7 +159,7 @@ if (BUILD_SHARED_LIBS)
)
endif ()
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS} ${f90CStub_CGEN_HDRS})
target_include_directories (${HDF5_F90_C_LIB_TARGET}
PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
@@ -202,7 +202,7 @@ endif ()
# Add Target to clang-format
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_FORMATTERS)
- if (NOT ONLY_SHARED_LIBS)
+ if (BUILD_STATIC_LIBS)
clang_format (HDF5_F90_C_SRC_FORMAT
${HDF5_F90_C_LIB_TARGET}
${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
@@ -236,7 +236,7 @@ add_custom_command (TARGET H5_buildiface POST_BUILD
DEPENDS H5_buildiface ${f90_F_GEN_SOURCES}
COMMENT "Generating the H5_gen.F90 file"
)
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
add_custom_command (TARGET H5_buildiface POST_BUILD
BYPRODUCTS ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
COMMAND ${CMAKE_COMMAND}
@@ -287,7 +287,7 @@ set (f90_F_BASE_SOURCES
${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.F90
)
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
set (f90_F_SOURCES
# generated file
${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
@@ -319,7 +319,7 @@ endif ()
#-----------------------------------------------------------------------------
# Add Main fortran library
#-----------------------------------------------------------------------------
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SOURCES})
target_include_directories (${HDF5_F90_LIB_TARGET}
PRIVATE "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
@@ -401,7 +401,7 @@ install (
COMPONENT
fortheaders
)
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
install (
FILES
${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
@@ -423,7 +423,7 @@ else ()
)
endif ()
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
set (mod_files
${MOD_BUILD_DIR}/h5fortran_types.mod
${MOD_BUILD_DIR}/hdf5.mod
@@ -517,7 +517,7 @@ if (HDF5_EXPORTED_TARGETS)
INSTALL_TARGET_PDB (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
#INSTALL_TARGET_PDB (${HDF5_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
endif ()
- if (NOT ONLY_SHARED_LIBS)
+ if (BUILD_STATIC_LIBS)
INSTALL_TARGET_PDB (${HDF5_F90_C_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} fortlibraries)
#INSTALL_TARGET_PDB (${HDF5_F90_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} fortlibraries)
endif ()
@@ -552,7 +552,7 @@ endif ()
set (_PKG_CONFIG_LIBS_PRIVATE)
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${PKG_CONFIG_LIBNAME}")
endif ()
if (BUILD_SHARED_LIBS)