summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-12-12 19:44:03 (GMT)
committerBrad King <brad.king@kitware.com>2003-12-12 19:44:03 (GMT)
commit18112d0854c94fc4b0b20991579ce7576bb7baaa (patch)
tree830278c2f1c830951b3282b8abb9ab7ce33e1e28 /Modules/Platform
parentc1add9106c5a382d3e668dc2ea99ccfd7163c96e (diff)
downloadCMake-18112d0854c94fc4b0b20991579ce7576bb7baaa.zip
CMake-18112d0854c94fc4b0b20991579ce7576bb7baaa.tar.gz
CMake-18112d0854c94fc4b0b20991579ce7576bb7baaa.tar.bz2
ENH: Added CMAKE_SHARED_LIBRARY_SONAME_FLAG setting to enable shared library version support for HP-UX.
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/HP-UX.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake
index b1445d3..38d293b 100644
--- a/Modules/Platform/HP-UX.cmake
+++ b/Modules/Platform/HP-UX.cmake
@@ -11,17 +11,19 @@ IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,+b") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") # : or empty
+ SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,+h")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
ELSE(CMAKE_COMPILER_IS_GNUCC)
# hp cc
SET(CMAKE_ANSI_CFLAGS "-Aa -Ae")
# use ld directly to create shared libraries for hp cc
SET(CMAKE_C_CREATE_SHARED_LIBRARY
- "ld <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+ "ld <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "+Z") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-E -b -L/usr/lib") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "+b") # -rpath
+ SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "+h")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
# CXX compiler
@@ -32,12 +34,14 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,+b") # -rpath
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
+ SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,+h")
ELSE(CMAKE_COMPILER_IS_GNUCXX)
# for hp aCC
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "+Z") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "+Z -Wl,-E -b -L/usr/lib") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,+b") # -rpath
+ SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,+h")
SET (CMAKE_CXX_FLAGS_INIT "")
SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "+O3")