Changeset 707:e387d5c6b6f5 in freeDiameter for include/freeDiameter/CMakeLists.txt
- Timestamp:
- Feb 9, 2011, 6:08:54 PM (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/CMakeLists.txt
r677 r707 19 19 SET(DEFAULT_EXTENSIONS_PATH ${CMAKE_INSTALL_PREFIX}/${INSTALL_EXTENSIONS_SUFFIX}) 20 20 21 # IDNA considerations 22 OPTION(DIAMID_IDNA_IGNORE "Ignore completly invalid characters in Diameter Identities (process blindly)?" OFF) 23 IF (NOT DIAMID_IDNA_IGNORE) 24 OPTION (DIAMID_IDNA_REJECT "Reject internationalized Diameter Identities, do not attempt to convert it (stringprep) ?" OFF) 25 ENDIF (NOT DIAMID_IDNA_IGNORE) 21 26 22 MARK_AS_ADVANCED(DISABLE_SCTP DEBUG_SCTP SCTP_USE_MAPPED_ADDRESSES ERRORS_ON_TODO )27 MARK_AS_ADVANCED(DISABLE_SCTP DEBUG_SCTP SCTP_USE_MAPPED_ADDRESSES ERRORS_ON_TODO DIAMID_IDNA_IGNORE DIAMID_IDNA_REJECT) 23 28 24 29 ######################## … … 109 114 SET(SCTP_LIBRARIES ${SCTP_LIBRARIES} PARENT_SCOPE) 110 115 116 # IDNA process: we use libidn from GNU (unless the function & header files are included in libc) 117 IF(NOT DIAMID_IDNA_IGNORE AND NOT DIAMID_IDNA_REJECT) 118 FIND_PACKAGE(IDNA) 119 SET(CHECK_IDNA_SOURCE_CODE " 120 #include <idna.h> 121 int main() { 122 return idna_to_ascii_8z(NULL, NULL, 0); 123 } 124 ") 125 SET(CMAKE_REQUIRED_INCLUDES ${IDNA_INCLUDE_DIR}) 126 SET(CMAKE_REQUIRED_LIBRARIES ${IDNA_LIBRARIES}) 127 CHECK_C_SOURCE_COMPILES("${CHECK_IDNA_SOURCE_CODE}" HAS_IDNA_SUPPORT) 128 IF(NOT HAS_IDNA_SUPPORT) 129 MESSAGE(SEND_ERROR "Unable to find idna.h header or idna_to_ascii_8z function, please install libidn-dev or equivalent, or set DIAMID_IDNA_IGNORE or DIAMID_IDNA_REJECT") 130 ENDIF(NOT HAS_IDNA_SUPPORT) 131 ELSE (NOT DIAMID_IDNA_IGNORE AND NOT DIAMID_IDNA_REJECT) 132 MESSAGE(STATUS "Non-default Internationalized Domain Names (IDN) behavior selected (no stringprep).") 133 ENDIF(NOT DIAMID_IDNA_IGNORE AND NOT DIAMID_IDNA_REJECT) 134 SET(IDNA_INCLUDE_DIR ${IDNA_INCLUDE_DIR} PARENT_SCOPE) 135 SET(IDNA_LIBRARIES ${IDNA_LIBRARIES} PARENT_SCOPE) 136 111 137 112 138 # Require GNU TLS for building the library … … 135 161 136 162 # LFDPROTO_LIBS = libraries required by the libfdproto. 137 SET(LFDPROTO_LIBS ${CLOCK_GETTIME_LIBS} ${CMAKE_THREAD_LIBS_INIT} PARENT_SCOPE) 163 SET(LFDPROTO_LIBS ${CLOCK_GETTIME_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${IDNA_LIBRARIES} PARENT_SCOPE) 164 # And includes paths 165 SET(LFDPROTO_INCLUDES ${IDNA_INCLUDE_DIR} PARENT_SCOPE) 138 166 # Dependencies: the libraries required by any code linking to libfdproto. 139 167 SET(LFDPROTO_LINK_INTERFACES ${CMAKE_THREAD_LIBS_INIT} PARENT_SCOPE)
Note: See TracChangeset
for help on using the changeset viewer.