CMakeLists.txt
changeset 66 a40beb82130c
parent 65 72ffcf688664
equal deleted inserted replaced
65:72ffcf688664 66:a40beb82130c
    14 # You should have received a copy of the GNU General Public License
    14 # You should have received a copy of the GNU General Public License
    15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    16 
    16 
    17 cmake_minimum_required(VERSION 2.6)
    17 cmake_minimum_required(VERSION 2.6)
    18 project(lua-lm C)
    18 project(lua-lm C)
    19 set(PROJECT_VERSION "0.9.6")
    19 set(PROJECT_VERSION "0.9.7")
    20 
    20 
    21 ## User options
    21 ## User options
    22 option(DEBUG         "Enable debugging output" OFF)
    22 option(DEBUG         "Enable debugging output" OFF)
    23 set(TEST_USER        "test@jabber.org" CACHE STRING "Testing: Your jabber account name")
    23 set(TEST_USER        "test@jabber.org" CACHE STRING "Testing: Your jabber account name")
    24 set(TEST_PASSWORD    "greatsecret" CACHE STRING "Testing: Password for your jabber account")
    24 set(TEST_PASSWORD    "greatsecret" CACHE STRING "Testing: Password for your jabber account")
    53 	set(HAVE_LM_SHA256_FINGERPRINTS TRUE)
    53 	set(HAVE_LM_SHA256_FINGERPRINTS TRUE)
    54 else()
    54 else()
    55 	pkg_check_modules(LM REQUIRED loudmouth-1.0)
    55 	pkg_check_modules(LM REQUIRED loudmouth-1.0)
    56 endif()
    56 endif()
    57 include(CheckFunctionExists)
    57 include(CheckFunctionExists)
       
    58 include(CheckStructHasMember)
    58 set(CMAKE_REQUIRED_INCLUDES ${LM_INCLUDE_DIRS})
    59 set(CMAKE_REQUIRED_INCLUDES ${LM_INCLUDE_DIRS})
    59 set(CMAKE_REQUIRED_LIBRARIES ${LM_LIBRARIES})
    60 set(CMAKE_REQUIRED_LIBRARIES ${LM_LIBRARIES})
    60 set(CMAKE_REQUIRED_FLAGS ${LM_LDFLAGS} ${LM_CFLAGS})
    61 set(CMAKE_REQUIRED_FLAGS ${LM_LDFLAGS} ${LM_CFLAGS})
    61 check_function_exists(lm_connection_get_keep_alive_rate HAVE_LM_CONNECTION_GET_KEEP_ALIVE_RATE)
    62 check_function_exists(lm_connection_get_keep_alive_rate HAVE_LM_CONNECTION_GET_KEEP_ALIVE_RATE)
    62 check_function_exists(lm_connection_unregister_reply_handler HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER)
    63 check_function_exists(lm_connection_unregister_reply_handler HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER)
    63 check_function_exists(lm_ssl_set_ca HAVE_LM_SSL_SET_CA)
    64 check_function_exists(lm_ssl_set_ca HAVE_LM_SSL_SET_CA)
    64 check_function_exists(lm_ssl_set_cipher_list HAVE_LM_SSL_SET_CIPHER_LIST)
    65 check_function_exists(lm_ssl_set_cipher_list HAVE_LM_SSL_SET_CIPHER_LIST)
       
    66 check_struct_has_member("LmMessageNodeAttribute" next loudmouth/loudmouth.h HAVE_LM_MESSAGE_NODE_ATTRIBUTE)
    65 find_program(DOCGEN_EXECUTABLE NAMES docgen.pl docgen DOC "Docgen documentation generator script (optional)")
    67 find_program(DOCGEN_EXECUTABLE NAMES docgen.pl docgen DOC "Docgen documentation generator script (optional)")
    66 # (this should be before targets definitions)
    68 # (this should be before targets definitions)
    67 link_directories(${LUA_LIBRARY_DIRS} ${GLIB_LIBRARY_DIRS} ${LM_LIBRARY_DIRS})
    69 link_directories(${LUA_LIBRARY_DIRS} ${GLIB_LIBRARY_DIRS} ${LM_LIBRARY_DIRS})
    68 
    70 
    69 ## Define targets
    71 ## Define targets