1if(NOT DEFINED CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH)
2  set(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib)
3endif()
4
5if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "ia64")
6  set(CMAKE_SHARED_LIBRARY_SUFFIX ".sl")          # .so
7  set(CMAKE_FIND_LIBRARY_SUFFIXES ".sl" ".so" ".a")
8  set(CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES ".so")
9endif()
10set(CMAKE_DL_LIBS "dld")
11
12# The HP linker needs to find transitive shared library dependencies
13# in the -L path.  Therefore the runtime path must be added to the
14# link line with -L flags.
15set(CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH 1)
16set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
17
18# Shared libraries with no builtin soname may not be linked safely by
19# specifying the file path.
20set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
21
22# set flags for gcc support
23include(Platform/UnixPaths)
24
25# Look in both 32-bit and 64-bit implicit link directories, but tell
26# CMake not to pass the paths to the linker.  The linker will find the
27# library for the proper architecture.  In the future we should detect
28# which path will be used by the linker.  Since the pointer type size
29# CMAKE_SIZEOF_VOID_P is not set until after this file executes, we
30# would need to append to CMAKE_SYSTEM_LIBRARY_PATH at a later point
31# (after CMakeTest(LANG)Compiler.cmake runs for at least one language).
32list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/hpux32)
33list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/hpux64)
34list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
35  /usr/lib/hpux32 /usr/lib/hpux64)
36
37# Initialize C and CXX link type selection flags.  These flags are
38# used when building a shared library, shared module, or executable
39# that links to other libraries to select whether to use the static or
40# shared versions of the libraries.
41foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
42  foreach(lang C CXX)
43    set(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Wl,-a,archive")
44    set(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-a,default")
45  endforeach()
46endforeach()
47
48