2012-08-13 17:47:32 +00:00
|
|
|
set(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib)
|
2010-09-07 12:44:19 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
set(CMAKE_SHARED_LIBRARY_SUFFIX ".sl") # .so
|
|
|
|
set(CMAKE_DL_LIBS "dld")
|
|
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ".sl" ".so" ".a")
|
|
|
|
set(CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES ".so")
|
2002-11-08 20:46:08 +00:00
|
|
|
|
2008-01-22 14:13:04 +00:00
|
|
|
# The HP linker needs to find transitive shared library dependencies
|
|
|
|
# in the -L path. Therefore the runtime path must be added to the
|
|
|
|
# link line with -L flags.
|
2012-08-13 17:47:32 +00:00
|
|
|
set(CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH 1)
|
|
|
|
set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
|
2002-11-08 20:46:08 +00:00
|
|
|
|
2008-02-21 16:41:11 +00:00
|
|
|
# Shared libraries with no builtin soname may not be linked safely by
|
|
|
|
# specifying the file path.
|
2012-08-13 17:47:32 +00:00
|
|
|
set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
|
2008-02-21 16:41:11 +00:00
|
|
|
|
2003-11-14 15:44:12 +00:00
|
|
|
# set flags for gcc support
|
2012-08-13 17:47:32 +00:00
|
|
|
include(Platform/UnixPaths)
|
2009-06-15 17:17:54 +00:00
|
|
|
|
2009-06-19 21:09:36 +00:00
|
|
|
# Look in both 32-bit and 64-bit implict link directories, but tell
|
|
|
|
# CMake not to pass the paths to the linker. The linker will find the
|
|
|
|
# library for the proper architecture. In the future we should detect
|
|
|
|
# which path will be used by the linker. Since the pointer type size
|
|
|
|
# CMAKE_SIZEOF_VOID_P is not set until after this file executes, we
|
|
|
|
# would need to append to CMAKE_SYSTEM_LIBRARY_PATH at a later point
|
|
|
|
# (after CMakeTest(LANG)Compiler.cmake runs for at least one language).
|
2012-08-13 17:47:32 +00:00
|
|
|
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/hpux32)
|
|
|
|
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/hpux64)
|
|
|
|
list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
|
2009-06-19 21:09:36 +00:00
|
|
|
/usr/lib/hpux32 /usr/lib/hpux64)
|
2006-08-09 17:10:01 +00:00
|
|
|
|
2006-09-15 19:18:34 +00:00
|
|
|
# Initialize C and CXX link type selection flags. These flags are
|
|
|
|
# used when building a shared library, shared module, or executable
|
|
|
|
# that links to other libraries to select whether to use the static or
|
|
|
|
# shared versions of the libraries. Note that C modules and shared
|
|
|
|
# libs are built using ld directly so we leave off the "-Wl," portion.
|
2012-08-13 17:47:32 +00:00
|
|
|
foreach(type SHARED_LIBRARY SHARED_MODULE)
|
|
|
|
set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-a archive")
|
|
|
|
set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-a default")
|
2012-08-13 17:50:14 +00:00
|
|
|
endforeach()
|
2012-08-13 17:47:32 +00:00
|
|
|
foreach(type EXE)
|
|
|
|
set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-a,archive")
|
|
|
|
set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-a,default")
|
2012-08-13 17:50:14 +00:00
|
|
|
endforeach()
|
2012-08-13 17:47:32 +00:00
|
|
|
foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
|
|
|
|
set(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Wl,-a,archive")
|
|
|
|
set(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Wl,-a,default")
|
2012-08-13 17:50:14 +00:00
|
|
|
endforeach()
|
2006-09-15 19:14:55 +00:00
|
|
|
|