Changeset 8:3e143f047f78 in freeDiameter for cmake/Modules/FindSCTP.cmake
- Timestamp:
- Sep 18, 2009, 6:54:07 PM (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cmake/Modules/FindSCTP.cmake
r0 r8 6 6 # SCTP_LIBRARIES - link these to use SCTP 7 7 8 include(LibFindMacros) 9 10 # Use pkg-config to get hints about paths (Note: not yet supported?) 11 # libfind_pkg_check_modules(SCTP_PKGCONF sctp) 8 if (SCTP_INCLUDE_DIRS) 9 set(SCTP_FIND_QUIETLY TRUE) 10 endif (SCTP_INCLUDE_DIRS) 12 11 13 12 # Include dir 14 13 find_path(SCTP_INCLUDE_DIR 15 14 NAMES netinet/sctp.h 16 PATHS ${SCTP_PKGCONF_INCLUDE_DIRS}17 15 ) 18 16 19 # Finally the library itself17 # Library 20 18 find_library(SCTP_LIBRARY 21 19 NAMES sctp 22 PATHS ${SCTP_PKGCONF_LIBRARY_DIRS}23 20 ) 24 21 25 22 # Set the include dir variables and the libraries and let libfind_process do the rest. 26 23 # NOTE: Singular variables for this library, plural for libraries this this lib depends on. 27 set(SCTP_PROCESS_INCLUDES SCTP_INCLUDE_DIR) 28 set(SCTP_PROCESS_LIBS SCTP_LIBRARY) 29 libfind_process(SCTP) 24 #set(SCTP_PROCESS_INCLUDES SCTP_INCLUDE_DIR) 25 #set(SCTP_PROCESS_LIBS SCTP_LIBRARY) 26 #libfind_process(SCTP) 27 28 29 # handle the QUIETLY and REQUIRED arguments and set SCTP_FOUND to TRUE if 30 # all listed variables are TRUE 31 INCLUDE(FindPackageHandleStandardArgs) 32 FIND_PACKAGE_HANDLE_STANDARD_ARGS(SCTP DEFAULT_MSG SCTP_LIBRARY SCTP_INCLUDE_DIR) 33 34 # If we successfully found the sctp library then add the library to the 35 # SCTP_LIBRARIES cmake variable otherwise set SCTP_LIBRARIES to nothing. 36 IF(SCTP_FOUND) 37 SET( SCTP_LIBRARIES ${SCTP_LIBRARY} ) 38 ELSE(SCTP_FOUND) 39 SET( SCTP_LIBRARIES ) 40 ENDIF(SCTP_FOUND) 41 42 43 # Lastly make it so that the SCTP_LIBRARY and SCTP_INCLUDE_DIR variables 44 # only show up under the advanced options in the gui cmake applications. 45 MARK_AS_ADVANCED( SCTP_LIBRARY SCTP_INCLUDE_DIR ) 46
Note: See TracChangeset
for help on using the changeset viewer.