File: CMakeLists.txt

package info (click to toggle)
libdigidoc 3.10.4+ds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,436 kB
  • sloc: ansic: 29,037; makefile: 15
file content (53 lines) | stat: -rw-r--r-- 1,649 bytes parent folder | download
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
cmake_minimum_required(VERSION 3.0)
project(libdigidoc VERSION 3.10.4)

set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
set( BUILD_TOOLS YES CACHE BOOL "Build digidoc-tool" )
set( BUILD_TYPE SHARED CACHE STRING "Build library as SHARED/STATIC" )
set( SIGNCERT "" CACHE STRING "Common name of certificate to used sign binaries, empty skip signing" )
set( INSTCERT "" CACHE STRING "Common name of certificate to used sign packages, empty skip signing" )
if( APPLE )
	set( FRAMEWORK YES CACHE BOOL "Build library as Mac OS X Framework" )
endif()

include( VersionInfo )
include( GNUInstallDirs )

if( WIN32 )
	set( DIGIDOC_CONF_NAME "digidoc.ini" )
else()
	set( DIGIDOC_CONF_NAME "digidoc.conf" )
endif()

find_package( Doxygen )
find_package( LibXml2 REQUIRED )
find_package( OpenSSL REQUIRED )
find_package( PKCS11 )
find_package( ZLIB REQUIRED )
find_package( Iconv )

if( DOXYGEN_FOUND )
	configure_file( ${CMAKE_SOURCE_DIR}/etc/Doxyfile.in Doxyfile @ONLY )
	add_custom_target( docs ALL
		${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
		WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
		COMMENT "Generating API documentation with Doxygen" VERBATIM
	)
	install( DIRECTORY ${CMAKE_BINARY_DIR}/doc/ DESTINATION ${CMAKE_INSTALL_DOCDIR}/libdigidoc )
	install( DIRECTORY doc/ DESTINATION ${CMAKE_INSTALL_DOCDIR}/libdigidoc )
endif()

configure_file( config.h.cmake config.h )

include_directories(
	${CMAKE_CURRENT_SOURCE_DIR}
	${CMAKE_CURRENT_BINARY_DIR}
	${LIBXML2_INCLUDE_DIR}
	${OPENSSL_INCLUDE_DIR}
	${ZLIB_INCLUDE_DIR}
)
if( ICONV_FOUND )
	include_directories( ${ICONV_INCLUDE_DIR} )
endif()

add_subdirectory( libdigidoc )