link additional Libraries on Solaris
This commit is contained in:
parent
3c28143a75
commit
391eb656fe
|
@ -18,6 +18,12 @@ endif()
|
||||||
|
|
||||||
configure_file(config.h.in config.h)
|
configure_file(config.h.in config.h)
|
||||||
|
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||||
|
find_library(NSL_LIB NAMES nsl)
|
||||||
|
# prefer the OpenCSW libintl over the one from /usr/lib/64
|
||||||
|
find_library(INTL_LIB NAMES intl HINTS /opt/csw/lib/64)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(mksh STATIC
|
add_library(mksh STATIC
|
||||||
lib/mksh/dosys.cc lib/mksh/globals.cc lib/mksh/i18n.cc lib/mksh/macro.cc
|
lib/mksh/dosys.cc lib/mksh/globals.cc lib/mksh/i18n.cc lib/mksh/macro.cc
|
||||||
lib/mksh/misc.cc lib/mksh/mksh.cc lib/mksh/read.cc
|
lib/mksh/misc.cc lib/mksh/mksh.cc lib/mksh/read.cc
|
||||||
|
@ -52,7 +58,7 @@ set_property(TARGET ${PROJECT_NAME} mksh vroot PROPERTY INCLUDE_DIRECTORIES
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
mksh vroot pthread ${BSD_LIBRARIES}
|
mksh vroot pthread ${BSD_LIBRARIES} ${NSL_LIB} ${INTL_LIB}
|
||||||
)
|
)
|
||||||
|
|
||||||
# default install prefix is /usr/local
|
# default install prefix is /usr/local
|
||||||
|
|
|
@ -317,7 +317,7 @@ If you are compiling on a legacy platform with ancient libraries
|
||||||
you may need to tweak the cmake call a little bit. For example,
|
you may need to tweak the cmake call a little bit. For example,
|
||||||
to compile with GCC on a Solaris 10 system:
|
to compile with GCC on a Solaris 10 system:
|
||||||
|
|
||||||
$ CC=gcc CXX=g++ LDFLAGS='-lnsl /opt/csw/lib/libintl.so.8' \
|
$ CC=gcc CXX=g++ CFLAGS='-m64' CXXFLAGS='-m64' \
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release ../somake
|
cmake -DCMAKE_BUILD_TYPE=Release ../somake
|
||||||
|
|
||||||
### Manual Installation
|
### Manual Installation
|
||||||
|
|
Loading…
Reference in a new issue