source: pacpusframework/trunk/cmake/PacpusDependencies.cmake@ 30

Last change on this file since 30 was 26, checked in by sgosseli, 12 years ago

Add the generation of the documentation in the build system.
To build the documentation on Windows:

cmake .. -DPACPUS_INSTALL_DIR=C:\Foo -DPACPUS_BUILD_DOC=TRUE
msbuild doc\documentation.vcxproj
msbuild INSTALL.vcxproj /p:Configuration=Release

Note: doxygen is required, of course.

File size: 1.8 KB
Line 
1#################################################
2# ___________ ____ ______ __ __ _____ #
3# \____ \__ \ _/ ___\\____ \| | \/ ___/ #
4# | |_> > __ \\ \___| |_> > | /\___ \ #
5# | __(____ /\___ > __/|____//____ > #
6# |__| \/ \/|__| \/ #
7# #
8#################################################
9
10# ========================================
11# Output
12# ========================================
13set(PACPUS_DEFINITIONS "")
14set(PACPUS_DEPENDENCIES_INC "")
15set(PACPUS_DEPENDENCIES_LIB "")
16
17# ========================================
18# All the Pacpus' modules depends from Qt4
19# However, since each module requires specific Qt's modules, they have to include their own QT_USE_FILE
20# ========================================
21find_package(Qt4 REQUIRED)
22
23# ========================================
24# log4cxx
25# ========================================
26if (PACPUS_USE_LOG)
27 find_package(log4cxx REQUIRED)
28
29 list(APPEND PACPUS_DEFINITIONS " -DPACPUS_USE_LOG ")
30 list(APPEND PACPUS_DEPENDENCIES_INC ${LOG4CXX_INCLUDE_DIRS})
31 list(APPEND PACPUS_DEPENDENCIES_LIB ${LOG4CXX_LIBRARIES})
32
33 # If needed, install the dll of log4cxx
34 if (WIN32 AND MSVC AND IS_BUILDING_PACPUS)
35 pacpus_get_msvc(MSVC_VERSION)
36 pacpus_purge_backslash(LOG4CXX_ROOT)
37
38 install(
39 FILES
40 ${LOG4CXX_ROOT}/bin/${MSVC_VERSION}/log4cxx.dll
41 ${LOG4CXX_ROOT}/bin/${MSVC_VERSION}/log4cxx_d.dll
42 DESTINATION
43 ${PACPUS_INSTALL_DIR}/bin
44 )
45 endif()
46endif()
47
48# ========================================
49# Doxygen
50# ========================================
51if (PACPUS_BUILD_DOC)
52 find_package(Doxygen)
53 if (NOT DOXYGEN_FOUND)
54 message(FATAL_ERROR "Doxygen is needed to build the documentation. Please install it correctly")
55 endif()
56endif()
Note: See TracBrowser for help on using the repository browser.