summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt11
-rw-r--r--config/cmake/hdf5-config.cmake.install.in2
2 files changed, 12 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e5f8bf..d7209ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -281,6 +281,17 @@ IF (BUILD_STATIC_EXECS)
ENDIF (BUILD_STATIC_EXECS)
#-----------------------------------------------------------------------------
+# Option to Build Static PIC
+#-----------------------------------------------------------------------------
+OPTION (BUILD_STATIC_PIC "Build Static PIC" OFF)
+IF (BUILD_STATIC_PIC)
+ IF (NOT WIN32)
+ SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+ ENDIF (NOT WIN32)
+ENDIF (BUILD_STATIC_PIC)
+
+#-----------------------------------------------------------------------------
# Option to use code coverage
#-----------------------------------------------------------------------------
OPTION (HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF)
diff --git a/config/cmake/hdf5-config.cmake.install.in b/config/cmake/hdf5-config.cmake.install.in
index 610841c..268d5ed 100644
--- a/config/cmake/hdf5-config.cmake.install.in
+++ b/config/cmake/hdf5-config.cmake.install.in
@@ -19,7 +19,7 @@ SET (HDF5_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
SET (HDF5_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
SET (HDF5_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
SET (HDF5_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
-SET (HDF5_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
+SET (HDF5_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
#-----------------------------------------------------------------------------
# Directories