Remove unused function SSL_readcert().
[umurmur.git] / src / CMakeLists.txt
1 set(SOURCE_FILES
2   ${CMAKE_CURRENT_SOURCE_DIR}/Mumble.pb-c.c
3   ${CMAKE_CURRENT_SOURCE_DIR}/ban.c
4   ${CMAKE_CURRENT_SOURCE_DIR}/channel.c
5   ${CMAKE_CURRENT_SOURCE_DIR}/client.c
6   ${CMAKE_CURRENT_SOURCE_DIR}/conf.c
7   ${CMAKE_CURRENT_SOURCE_DIR}/crypt.c
8   ${CMAKE_CURRENT_SOURCE_DIR}/log.c
9   ${CMAKE_CURRENT_SOURCE_DIR}/main.c
10   ${CMAKE_CURRENT_SOURCE_DIR}/messagehandler.c
11   ${CMAKE_CURRENT_SOURCE_DIR}/messages.c
12   ${CMAKE_CURRENT_SOURCE_DIR}/pds.c
13   ${CMAKE_CURRENT_SOURCE_DIR}/server.c
14   ${CMAKE_CURRENT_SOURCE_DIR}/timer.c
15   ${CMAKE_CURRENT_SOURCE_DIR}/util.c
16   ${CMAKE_CURRENT_SOURCE_DIR}/voicetarget.c
17   ${CMAKE_CURRENT_SOURCE_DIR}/memory.c
18   )
19
20 if(SSL MATCHES "openssl")
21   list(APPEND SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/ssli_openssl.c)
22 elseif(SSL MATCHES "polarssl")
23   list(APPEND SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/ssli_polarssl.c)
24 elseif(SSL MATCHES "mbedtls")
25   list(APPEND SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/ssli_mbedtls.c)
26 elseif(SSL MATCHES "gnutls")
27   list(APPEND SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/ssli_gnutls.c)
28 endif(SSL MATCHES "openssl")
29
30 if(USE_SHAREDMEMORY_API)
31   list(APPEND SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/sharedmemory.c)
32 endif(USE_SHAREDMEMORY_API)
33
34 configure_file(config.h.in ${CMAKE_SOURCE_DIR}/src/config.h)
35
36 include_directories(${LIBCONFIG_INCLUDE_DIR}
37                     ${PROTOBUFC_INCLUDE_DIR}
38                     ${SSLIMP_INCLUDE_DIR})
39
40 link_directories(${LIBCONFIG_LIB_DIR}
41                  ${PROTOBUFC_LIB_DIR}
42                  ${SSLIMP_LIB_DIR})
43
44 add_executable(${PROJECT_NAME} ${SOURCE_FILES})
45
46 target_link_libraries(${PROJECT_NAME}
47                       ${LIBCONFIG_LIBRARIES}
48                       ${PROTOBUFC_LIBRARIES}
49                       ${SSLIMP_LIBRARIES}
50                       ${LIBRT}
51                       ${CRYPTO_LIBRARIES})
52
53 install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "bin")