46
by Jerome Leclanche
Clean up CMakeLists.txt and drop Qt 4 support |
1 |
cmake_minimum_required(VERSION 2.8.11) |
2 |
||
3 |
project(liblxqt-mount) |
|
4 |
||
25
by Hone Jen Yee (PCMan)
* Rename binary to liblxqtmount and use LxQt namespace. |
5 |
# additional cmake files
|
46
by Jerome Leclanche
Clean up CMakeLists.txt and drop Qt 4 support |
6 |
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake") |
43
by Luís Pereira
Adds initial Qt5 support |
7 |
|
48
by Helio Chissini de Castro
- Proper install and configure files using cmake infrastructure |
8 |
# Standard directories for installation
|
9 |
include(GNUInstallDirs) |
|
10 |
||
39
by Jerome Leclanche
Use LXQt instead of lxde-qt |
11 |
set(MAJOR_VERSION 0) |
45
by Jerome Leclanche
Bump so version |
12 |
set(MINOR_VERSION 8) |
39
by Jerome Leclanche
Use LXQt instead of lxde-qt |
13 |
set(PATCH_VERSION 0) |
40.1.3
by Luís Pereira
Fixes an typo in an CMakeList.txt variable |
14 |
set(LXQTMOUNT_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}") |
31
by Hong Jen Yee (PCMan)
Add a cmake file for use in other programs. |
15 |
|
34
by Veeti Paananen
Allow installation path configuration with standard CMake X_INSTALL_DIR |
16 |
# Set default installation paths
|
35
by Veeti Paananen
Don't append library suffix to library install path, but use it by default |
17 |
set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Installation directory for libraries") |
34
by Veeti Paananen
Allow installation path configuration with standard CMake X_INSTALL_DIR |
18 |
set(INCLUDE_INSTALL_DIR include CACHE PATH "Installation directory for includes") |
19 |
||
46
by Jerome Leclanche
Clean up CMakeLists.txt and drop Qt 4 support |
20 |
find_package(Qt5Core REQUIRED QUIET) |
21 |
find_package(Qt5Gui REQUIRED QUIET) |
|
22 |
find_package(Qt5DBus REQUIRED QUIET) |
|
23 |
find_package(Qt5LinguistTools REQUIRED QUIET) |
|
24 |
message(STATUS "Building with Qt${Qt5Core_VERSION_STRING}") |
|
43
by Luís Pereira
Adds initial Qt5 support |
25 |
|
41.1.3
by Luís Pereira
Adds portable headers |
26 |
set(LXQTMOUNT_HEADER_NAMESPACE "LXQtMount") |
49
by Helio Chissini de Castro
- Unify naming to lxqt only. No need to use toolkit suffix anymore |
27 |
set(LXQTMOUNT_LIBRARY_NAME "lxqtmount") |
41.1.2
by Luís Pereira
Replaces hard-coded name by a variable |
28 |
|
46
by Jerome Leclanche
Clean up CMakeLists.txt and drop Qt 4 support |
29 |
include_directories( |
30 |
"${CMAKE_CURRENT_BINARY_DIR}"
|
|
9
by pvanek
razormount rewriten (lgpl2+) |
31 |
${QT_INCLUDES} |
1
by pvanek
huge refactoring of the libraries build organization |
32 |
)
|
33 |
||
25
by Hone Jen Yee (PCMan)
* Rename binary to liblxqtmount and use LxQt namespace. |
34 |
set(lxqtmount_HDRS |
41.1.1
by Luís Pereira
Changes files names |
35 |
mount.h
|
36 |
providers.h
|
|
1
by pvanek
huge refactoring of the libraries build organization |
37 |
)
|
38 |
||
25
by Hone Jen Yee (PCMan)
* Rename binary to liblxqtmount and use LxQt namespace. |
39 |
set(lxqtmount_SRCS |
41.1.1
by Luís Pereira
Changes files names |
40 |
mount.cpp
|
41 |
providers.cpp
|
|
42 |
providers_udisks2.cpp
|
|
1
by pvanek
huge refactoring of the libraries build organization |
43 |
)
|
44 |
||
25
by Hone Jen Yee (PCMan)
* Rename binary to liblxqtmount and use LxQt namespace. |
45 |
set(lxqtmount_MOCS |
41.1.1
by Luís Pereira
Changes files names |
46 |
mount.h
|
47 |
providers.h
|
|
1
by pvanek
huge refactoring of the libraries build organization |
48 |
)
|
49 |
||
41.1.3
by Luís Pereira
Adds portable headers |
50 |
set(LXQTMOUNT_PUBLIC_CLASSES |
51 |
Mount
|
|
52 |
Providers
|
|
53 |
)
|
|
43
by Luís Pereira
Adds initial Qt5 support |
54 |
|
46
by Jerome Leclanche
Clean up CMakeLists.txt and drop Qt 4 support |
55 |
QT5_WRAP_CPP(lxqtmount_MOCS ${lxqtmount_MOCS}) |
25
by Hone Jen Yee (PCMan)
* Rename binary to liblxqtmount and use LxQt namespace. |
56 |
|
30
by Hong Jen Yee (PCMan)
Use gcc visibility to avoid exporting unnecessary symbols. |
57 |
# use gcc visibility feature to decrease unnecessary exported symbols
|
39
by Jerome Leclanche
Use LXQt instead of lxde-qt |
58 |
if(CMAKE_COMPILER_IS_GNUCXX) |
59 |
# set visibility to hidden to hide symbols, unlesss they're exporeted manually in the code
|
|
60 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wl,-no-undefined -Wall") |
|
30
by Hong Jen Yee (PCMan)
Use gcc visibility to avoid exporting unnecessary symbols. |
61 |
endif() |
31
by Hong Jen Yee (PCMan)
Add a cmake file for use in other programs. |
62 |
add_definitions(-DCOMPILE_LIBLXQT_MOUNT) |
25
by Hone Jen Yee (PCMan)
* Rename binary to liblxqtmount and use LxQt namespace. |
63 |
|
41.1.2
by Luís Pereira
Replaces hard-coded name by a variable |
64 |
add_library(${LXQTMOUNT_LIBRARY_NAME} SHARED ${lxqtmount_SRCS} ${lxqtmount_MOCS}) |
25
by Hone Jen Yee (PCMan)
* Rename binary to liblxqtmount and use LxQt namespace. |
65 |
|
46
by Jerome Leclanche
Clean up CMakeLists.txt and drop Qt 4 support |
66 |
target_link_libraries( |
67 |
${LXQTMOUNT_LIBRARY_NAME} Qt5::Core Qt5::Gui Qt5::DBus |
|
68 |
)
|
|
1
by pvanek
huge refactoring of the libraries build organization |
69 |
|
41.1.2
by Luís Pereira
Replaces hard-coded name by a variable |
70 |
set_target_properties(${LXQTMOUNT_LIBRARY_NAME} PROPERTIES |
40.1.3
by Luís Pereira
Fixes an typo in an CMakeList.txt variable |
71 |
VERSION ${LXQTMOUNT_VERSION} |
40.1.2
by Luís Pereira
Removes the last dependency on liblxqt |
72 |
SOVERSION ${MAJOR_VERSION} |
1
by pvanek
huge refactoring of the libraries build organization |
73 |
)
|
41.1.3
by Luís Pereira
Adds portable headers |
74 |
include(cmake/create_portable_headers.cmake) |
75 |
||
76 |
create_portable_headers(LXQTMOUNT_NAMESPACE_HEADERS |
|
77 |
NAMESPACE "${LXQTMOUNT_HEADER_NAMESPACE}/" |
|
78 |
FILENAMES ${LXQTMOUNT_PUBLIC_CLASSES} |
|
79 |
)
|
|
1
by pvanek
huge refactoring of the libraries build organization |
80 |
|
41.1.2
by Luís Pereira
Replaces hard-coded name by a variable |
81 |
install(TARGETS ${LXQTMOUNT_LIBRARY_NAME} DESTINATION ${LIB_INSTALL_DIR}) |
82 |
install(FILES ${lxqtmount_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/${LXQTMOUNT_LIBRARY_NAME}) |
|
41.1.3
by Luís Pereira
Adds portable headers |
83 |
install(FILES ${LXQTMOUNT_NAMESPACE_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/${LXQTMOUNT_LIBRARY_NAME}/${LXQTMOUNT_HEADER_NAMESPACE}) |
1
by pvanek
huge refactoring of the libraries build organization |
84 |
|
6
by pvanek
implemented #70: pkg-config for libs |
85 |
include(create_pkgconfig_file) |
41.1.2
by Luís Pereira
Replaces hard-coded name by a variable |
86 |
create_pkgconfig_file(${LXQTMOUNT_LIBRARY_NAME} "LXQt library for removable media/devices") |
31
by Hong Jen Yee (PCMan)
Add a cmake file for use in other programs. |
87 |
|
88 |
# cmake config file
|
|
48
by Helio Chissini de Castro
- Proper install and configure files using cmake infrastructure |
89 |
set(LXQTMOUNT_INCLUDE_DIR ${INCLUDE_INSTALL_DIR}/${LXQTMOUNT_LIBRARY_NAME}) |
90 |
set(LXQT_INSTALL_CMAKE_DIR ${CMAKE_INSTALL_FULL_LIBDIR}/cmake) |
|
31
by Hong Jen Yee (PCMan)
Add a cmake file for use in other programs. |
91 |
configure_file( |
92 |
${CMAKE_CURRENT_SOURCE_DIR}/cmake/lxqtmount-config.cmake.in |
|
41.1.2
by Luís Pereira
Replaces hard-coded name by a variable |
93 |
${CMAKE_CURRENT_BINARY_DIR}/${LXQTMOUNT_LIBRARY_NAME}-config.cmake |
31
by Hong Jen Yee (PCMan)
Add a cmake file for use in other programs. |
94 |
@ONLY
|
95 |
)
|
|
48
by Helio Chissini de Castro
- Proper install and configure files using cmake infrastructure |
96 |
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LXQTMOUNT_LIBRARY_NAME}-config.cmake DESTINATION ${LXQT_INSTALL_CMAKE_DIR}/${LXQTMOUNT_LIBRARY_NAME}) |
97 |
install(FILES cmake/lxqtmount_use.cmake DESTINATION ${LXQT_INSTALL_CMAKE_DIR}/${LXQTMOUNT_LIBRARY_NAME}) |
|
38
by Hong Jen Yee (PCMan)
Add CPack rules for creating tarballs. |
98 |
|
99 |
# building tarball with CPack -------------------------------------------------
|
|
46
by Jerome Leclanche
Clean up CMakeLists.txt and drop Qt 4 support |
100 |
include(InstallRequiredSystemLibraries) |
101 |
set(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION}) |
|
102 |
set(CPACK_PACKAGE_VERSION_MINOR ${MINOR_VERSION}) |
|
103 |
set(CPACK_PACKAGE_VERSION_PATCH ${PATCH_VERSION}) |
|
104 |
set(CPACK_GENERATOR TBZ2) |
|
105 |
set(CPACK_SOURCE_GENERATOR TBZ2) |
|
106 |
set(CPACK_SOURCE_IGNORE_FILES /build/;.gitignore;.*~;.git;.kdev4;temp) |
|
107 |
include(CPack) |