Browse Source

sctp: cmake - search for libsctp on linux only

drTr0jan 6 months ago
parent
commit
41b2cba74a
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/modules/sctp/CMakeLists.txt

+ 5 - 5
src/modules/sctp/CMakeLists.txt

@@ -14,11 +14,11 @@ endif()
 
 
 target_include_directories(${module_name} PRIVATE ${SCTP_INCLUDE_DIR})
 target_include_directories(${module_name} PRIVATE ${SCTP_INCLUDE_DIR})
 
 
-find_library(
-  SCTP_LIBRARY
-  NAMES sctp
-  PATHS /usr/lib /usr/local/lib)
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+  find_library(
+    SCTP_LIBRARY
+    NAMES sctp
+    PATHS /usr/lib /usr/local/lib)
 
 
-if(UNIX)
   target_link_libraries(${module_name} PRIVATE ${SCTP_LIBRARY})
   target_link_libraries(${module_name} PRIVATE ${SCTP_LIBRARY})
 endif()
 endif()