Browse Source

Link against libsocket and libnsl on Solaris

Fixes #21
tags/1.3
Timo Röhling 9 years ago
parent
commit
505f09d135
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      CMakeLists.txt

+ 6
- 0
CMakeLists.txt View File

@@ -15,6 +15,8 @@ find_program(DD dd DOC "path to dd executable")
15 15
 find_program(BASE64 base64 DOC "path to base64 executable")
16 16
 find_program(INSSERV insserv DOC "path to insserv executable")
17 17
 find_program(CHKCONFIG chkconfig DOC "path to chkconfig executable")
18
+find_library(LIBSOCKET socket)
19
+find_library(LIBNSL nsl)
18 20
 
19 21
 check_include_file(sys/wait.h HAVE_SYS_WAIT_H)
20 22
 if(HAVE_SYS_WAIT_H)
@@ -55,6 +57,10 @@ endif()
55 57
 
56 58
 add_executable(${PROJECT_NAME} postsrsd.c sha1.c srs2.c)
57 59
 
60
+if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
61
+    target_link_libraries(${PROJECT_NAME} ${LIBSOCKET} ${LIBNSL})
62
+endif()
63
+
58 64
 get_target_property(POSTSRSD ${PROJECT_NAME} LOCATION)
59 65
 get_filename_component(POSTSRSD ${POSTSRSD} NAME_WE)
60 66
 set(APPARMOR_PROFILE "${CMAKE_INSTALL_PREFIX}/sbin/${POSTSRSD}")

Loading…
Cancel
Save