-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
70 lines (58 loc) · 1.97 KB
/
CMakeLists.txt
File metadata and controls
70 lines (58 loc) · 1.97 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
### CMakeLists automatically created with AutoVala
### Do not edit
if(CMAKE_VERSION VERSION_LESS "3.3.0")
cmake_minimum_required (VERSION 2.6)
cmake_policy (VERSION 2.8)
elseif(CMAKE_VERSION VERSION_LESS "3.5.0")
cmake_minimum_required (VERSION 3.3)
cmake_policy (VERSION 3.3)
elseif(CMAKE_VERSION VERSION_LESS "3.10.0")
cmake_minimum_required (VERSION 3.5)
cmake_policy (VERSION 3.5)
else()
cmake_minimum_required (VERSION 3.10)
cmake_policy (VERSION 3.10)
endif()
project (dm_logger)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
option(ICON_UPDATE "Update the icon cache after installing" ON)
option(BUILD_VALADOC "Build API documentation if Valadoc is available" OFF)
set( DM_LOGGER_MAJOR 1 )
set( DM_LOGGER_MINOR 0 )
set( DM_LOGGER_RELEASE 0 )
set( DM_LOGGER_NAME dm_logger-${DM_LOGGER_MAJOR}.${DM_LOGGER_MINOR} )
set( DM_LOGGER_VERSION ${DM_LOGGER_MAJOR}.${DM_LOGGER_MINOR}.${DM_LOGGER_RELEASE} )
set(HAVE_VALADOC OFF)
if(BUILD_VALADOC)
find_package(Valadoc)
if(VALADOC_FOUND)
set(HAVE_VALADOC ON)
include(Valadoc)
else()
message("Valadoc not found, will not build documentation")
endif()
endif()
find_package(PkgConfig)
set (MODULES_TO_CHECK glib-2.0 dmtestlib-1.0 gobject-2.0 gio-2.0 gthread-2.0 zlib open_dmlib-1.0)
pkg_check_modules(DEPS REQUIRED ${MODULES_TO_CHECK})
if(${CMAKE_SYSTEM_NAME} STREQUAL Emscripten)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
endif( )
set( LIBS )
foreach( PKGLIB ${DEPS_LIBRARIES} )
find_library( _LIB_${PKGLIB} ${PKGLIB} PATHS ${DEPS_LIBRARY_DIRS})
list( APPEND LIBS ${_LIB_${PKGLIB}} )
endforeach( PKGLIB )
add_definitions (${DEPS_CFLAGS})
link_directories ( ${DEPS_LIBRARY_DIRS} )
link_libraries ( ${LIBS} )
set( VAPIDIRS_ARGS "" )
if( NOT ${VAPIDIRS} STREQUAL "" )
string( REPLACE ":" ";" VAPIDIRS_LIST ${VAPIDIRS} )
foreach ( VAPIDIR ${VAPIDIRS_LIST} )
set( VAPIDIRS_ARGS ${VAPIDIRS_ARGS} "--vapidir=${VAPIDIR}" )
endforeach ( VAPIDIR )
endif()
add_subdirectory(src)
add_subdirectory(tests)
add_subdirectory(doc)