-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
31 lines (22 loc) · 1.19 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cmake_minimum_required(VERSION 2.8)
project(libdazeus-irc)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
set( LIBDAZEUS_IRC_VERSION_MAJOR "1" )
set( LIBDAZEUS_IRC_VERSION_MINOR "0" )
set( LIBDAZEUS_IRC_VERSION "${LIBDAZEUS_IRC_VERSION_MAJOR}.${LIBDAZEUS_IRC_VERSION_MINOR}" )
SET(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib CACHE PATH "The place where the library and pkgconfig files will be stored")
SET(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include CACHE PATH "The place where the header files will be stored")
find_package(LibIRCClient REQUIRED)
find_package(OpenSSL REQUIRED)
add_subdirectory(src)
add_subdirectory(tests)
# pkg-config file
configure_file(libdazeus-irc.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libdazeus-irc.pc)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/libdazeus-irc.pc
DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
enable_testing()
add_test(compile tests/compile)
add_test(connect ${CMAKE_SOURCE_DIR}/tests/connect.pl tests/connect)
add_test(reconnect ${CMAKE_SOURCE_DIR}/tests/reconnect.pl tests/reconnect)
add_test(connectevents ${CMAKE_SOURCE_DIR}/tests/connectevents.pl tests/connectevents)