source: pacpusframework/branches/2.0-beta1/cmake/PacpusDependencies.cmake@ 101

Last change on this file since 101 was 92, checked in by morasjul, 12 years ago

Fix TestComponents CMakeLists.txt, add Pacpus libs (missing)

  • Property svn:executable set to *
File size: 3.1 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 Qt5
19# However, since each module requires specific Qt's modules, they have to include their own QT_USE_FILE
20# ========================================
21
22# Tell CMake to run moc when necessary:
23#set(CMAKE_AUTOMOC ON)
24# As moc files are generated in the binary dir, tell CMake
25# to always look for includes there:
26set(CMAKE_INCLUDE_CURRENT_DIR ON)
27
28find_package(Qt5Widgets REQUIRED)
29find_package(Qt5Core REQUIRED)
30find_package(Qt5Xml REQUIRED)
31find_package(Qt5Gui REQUIRED)
32find_package(Qt5OpenGL REQUIRED)
33find_package(Qt5Network REQUIRED)
34
35set(QT_DEFINITIONS
36${Qt5Widgets_DEFINITIONS}
37${Qt5Core_DEFINITIONS}
38${Qt5Xml_DEFINITIONS}
39${Qt5Gui_DEFINITIONS}
40${Qt5OpenGL_DEFINITIONS}
41${Qt5Network_DEFINITIONS}
42)
43set(QT_INCLUDE_DIR
44${Qt5Widgets_INCLUDE_DIRS}
45${Qt5Core_INCLUDE_DIRS}
46${Qt5Xml_INCLUDE_DIRS}
47${Qt5Gui_INCLUDE_DIRS}
48${Qt5OpenGL_INCLUDE_DIRS}
49${Qt5Network_INCLUDE_DIRS}
50)
51
52set(QT_LIBRARIES
53${Qt5Widgets_LIBRARIES}
54${Qt5Core_LIBRARIES}
55${Qt5Xml_LIBRARIES}
56${Qt5Gui_LIBRARIES}
57${Qt5OpenGL_LIBRARIES}
58${Qt5Network_LIBRARIES}
59)
60
61if(Qt5_POSITION_INDEPENDENT_CODE)
62 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
63endif()
64
65# ========================================
66# Boost
67# Do not use compiled modules, include-only headers.
68# ========================================
69#find_package(Boost 1.49.0 REQUIRED)
70#list(APPEND PACPUS_DEPENDENCIES_INC ${Boost_INCLUDE_DIRS})
71
72# ========================================
73# log4cxx
74# ========================================
75if(PACPUS_USE_LOG)
76
77 if(WIN32 AND MSVC AND IS_BUILDING_PACPUS)
78 set(LOG4CXX_ROOT ${PACPUS_3RD_PARTY_DIR}/apache-log4cxx)
79 endif()
80
81 find_package(log4cxx REQUIRED)
82
83 list(APPEND PACPUS_DEFINITIONS " -DPACPUS_USE_LOG ")
84 list(APPEND PACPUS_DEPENDENCIES_INC ${LOG4CXX_INCLUDE_DIRS})
85 list(APPEND PACPUS_DEPENDENCIES_LIB ${LOG4CXX_LIBRARIES})
86
87 # If needed, install the dll of log4cxx
88 if(WIN32 AND MSVC AND IS_BUILDING_PACPUS)
89 pacpus_get_msvc(MSVC_VERSION)
90 pacpus_purge_backslash(LOG4CXX_ROOT)
91
92 install(
93 FILES
94 ${LOG4CXX_ROOT}/bin/${MSVC_VERSION}/log4cxx.dll
95 ${LOG4CXX_ROOT}/bin/${MSVC_VERSION}/log4cxx_d.dll
96 DESTINATION
97 ${PACPUS_INSTALL_DIR}/bin
98 )
99 endif()
100endif()
101
102# ========================================
103# Doxygen
104# ========================================
105if(PACPUS_BUILD_DOC)
106 find_package(Doxygen)
107 if(NOT DOXYGEN_FOUND)
108 message(FATAL_ERROR "Doxygen is needed to build the documentation. Please install it correctly")
109 endif()
110endif()
Note: See TracBrowser for help on using the repository browser.