Skip to content
Permalink
Browse files

modernize CMakeLists.txt files

  • Loading branch information
3nids committed Nov 12, 2020
1 parent 61a5424 commit 435861712339c470a5b08ca082fea990e0931b03
Showing with 3,308 additions and 3,308 deletions.
  1. +666 −666 CMakeLists.txt
  2. +54 −54 doc/CMakeLists.txt
  3. +6 −6 external/astyle/CMakeLists.txt
  4. +9 −9 external/libdxfrw/CMakeLists.txt
  5. +2 −2 external/o2/src/CMakeLists.txt
  6. +11 −11 external/qspatialite/CMakeLists.txt
  7. +6 −6 external/qt-unix-signals/CMakeLists.txt
  8. +23 −23 i18n/CMakeLists.txt
  9. +3 −3 images/CMakeLists.txt
  10. +6 −6 images/icons/CMakeLists.txt
  11. +4 −4 images/icons/mac/CMakeLists.txt
  12. +7 −7 images/svg/CMakeLists.txt
  13. +3 −3 images/themes/default/CMakeLists.txt
  14. +23 −23 mac/CMakeLists.txt
  15. +8 −8 postinstall/CMakeLists.txt
  16. +192 −192 python/CMakeLists.txt
  17. +12 −12 python/PyQt/CMakeLists.txt
  18. +9 −9 python/console/CMakeLists.txt
  19. +14 −14 python/ext-libs/CMakeLists.txt
  20. +31 −31 python/plugins/CMakeLists.txt
  21. +10 −10 python/plugins/MetaSearch/CMakeLists.txt
  22. +5 −5 python/plugins/db_manager/CMakeLists.txt
  23. +8 −8 python/plugins/db_manager/db_plugins/CMakeLists.txt
  24. +1 −1 python/plugins/db_manager/db_plugins/gpkg/CMakeLists.txt
  25. +1 −1 python/plugins/db_manager/db_plugins/oracle/CMakeLists.txt
  26. +7 −7 python/plugins/db_manager/db_plugins/postgis/CMakeLists.txt
  27. +2 −2 python/plugins/db_manager/db_plugins/postgis/plugins/CMakeLists.txt
  28. +2 −2 python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/CMakeLists.txt
  29. +1 −1 python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/templates/CMakeLists.txt
  30. +2 −2 python/plugins/db_manager/db_plugins/postgis/plugins/versioning/CMakeLists.txt
  31. +1 −1 python/plugins/db_manager/db_plugins/spatialite/CMakeLists.txt
  32. +1 −1 python/plugins/db_manager/db_plugins/vlayers/CMakeLists.txt
  33. +1 −1 python/plugins/db_manager/icons/CMakeLists.txt
  34. +13 −13 python/plugins/processing/CMakeLists.txt
  35. +7 −7 python/plugins/processing/algs/CMakeLists.txt
  36. +2 −2 python/plugins/processing/algs/gdal/CMakeLists.txt
  37. +2 −2 python/plugins/processing/algs/gdal/ui/CMakeLists.txt
  38. +4 −4 python/plugins/processing/algs/grass7/CMakeLists.txt
  39. +1 −1 python/plugins/processing/algs/grass7/ext/CMakeLists.txt
  40. +2 −2 python/plugins/processing/algs/help/CMakeLists.txt
  41. +1 −1 python/plugins/processing/algs/otb/CMakeLists.txt
  42. +2 −2 python/plugins/processing/algs/qgis/CMakeLists.txt
  43. +2 −2 python/plugins/processing/algs/qgis/ui/CMakeLists.txt
  44. +3 −3 python/plugins/processing/algs/saga/CMakeLists.txt
  45. +1 −1 python/plugins/processing/algs/saga/ext/CMakeLists.txt
  46. +1 −1 python/plugins/processing/core/CMakeLists.txt
  47. +2 −2 python/plugins/processing/gui/CMakeLists.txt
  48. +2 −2 python/plugins/processing/images/CMakeLists.txt
  49. +1 −1 python/plugins/processing/images/gdaltools/CMakeLists.txt
  50. +2 −2 python/plugins/processing/modeler/CMakeLists.txt
  51. +1 −1 python/plugins/processing/preconfigured/CMakeLists.txt
  52. +1 −1 python/plugins/processing/script/CMakeLists.txt
  53. +11 −11 python/plugins/processing/tests/CMakeLists.txt
  54. +1 −1 python/plugins/processing/tools/CMakeLists.txt
  55. +1 −1 python/plugins/processing/ui/CMakeLists.txt
  56. +10 −10 python/processing/CMakeLists.txt
  57. +10 −10 python/pyplugin_installer/CMakeLists.txt
  58. +3 −3 python/qsci_apis/CMakeLists.txt
  59. +9 −9 python/testing/CMakeLists.txt
  60. +29 −29 resources/CMakeLists.txt
  61. +31 −31 src/3d/CMakeLists.txt
  62. +51 −51 src/CMakeLists.txt
  63. +51 −51 src/analysis/CMakeLists.txt
  64. +154 −154 src/app/CMakeLists.txt
  65. +11 −11 src/auth/CMakeLists.txt
  66. +10 −10 src/auth/basic/CMakeLists.txt
  67. +10 −10 src/auth/esritoken/CMakeLists.txt
  68. +10 −10 src/auth/identcert/CMakeLists.txt
  69. +49 −49 src/auth/oauth2/CMakeLists.txt
  70. +10 −10 src/auth/pkipaths/CMakeLists.txt
  71. +10 −10 src/auth/pkipkcs12/CMakeLists.txt
  72. +125 −125 src/core/CMakeLists.txt
  73. +7 −7 src/crashhandler/CMakeLists.txt
  74. +17 −17 src/crssync/CMakeLists.txt
  75. +23 −23 src/customwidgets/CMakeLists.txt
  76. +72 −72 src/gui/CMakeLists.txt
  77. +69 −69 src/native/CMakeLists.txt
  78. +16 −16 src/plugins/CMakeLists.txt
  79. +9 −9 src/plugins/geometry_checker/CMakeLists.txt
  80. +7 −7 src/plugins/gps_importer/CMakeLists.txt
  81. +2 −2 src/plugins/grass/6/CMakeLists.txt
  82. +1 −1 src/plugins/grass/7/CMakeLists.txt
  83. +71 −71 src/plugins/grass/CMakeLists.txt
  84. +4 −4 src/plugins/grass/modules/CMakeLists.txt
  85. +4 −4 src/plugins/grass/scripts/CMakeLists.txt
  86. +8 −8 src/plugins/offline_editing/CMakeLists.txt
  87. +8 −8 src/plugins/topology/CMakeLists.txt
  88. +23 −23 src/process/CMakeLists.txt
  89. +26 −26 src/providers/CMakeLists.txt
  90. +31 −31 src/providers/arcgisrest/CMakeLists.txt
  91. +18 −18 src/providers/db2/CMakeLists.txt
  92. +17 −17 src/providers/delimitedtext/CMakeLists.txt
  93. +17 −17 src/providers/geonode/CMakeLists.txt
  94. +6 −6 src/providers/gpx/CMakeLists.txt
  95. +2 −2 src/providers/grass/6/CMakeLists.txt
  96. +2 −2 src/providers/grass/7/CMakeLists.txt
  97. +172 −172 src/providers/grass/CMakeLists.txt
  98. +87 −87 src/providers/mdal/CMakeLists.txt
  99. +17 −17 src/providers/mssql/CMakeLists.txt
  100. +18 −18 src/providers/oracle/CMakeLists.txt
  101. +16 −16 src/providers/oracle/ocispatial/CMakeLists.txt
  102. +9 −9 src/providers/ows/CMakeLists.txt
  103. +42 −42 src/providers/postgres/CMakeLists.txt
  104. +21 −21 src/providers/spatialite/CMakeLists.txt
  105. +22 −22 src/providers/virtual/CMakeLists.txt
  106. +12 −12 src/providers/wcs/CMakeLists.txt
  107. +16 −16 src/providers/wfs/CMakeLists.txt
  108. +31 −31 src/providers/wms/CMakeLists.txt
  109. +13 −13 src/python/CMakeLists.txt
  110. +25 −25 src/quickgui/CMakeLists.txt
  111. +33 −33 src/quickgui/plugin/CMakeLists.txt
  112. +45 −45 src/server/CMakeLists.txt
  113. +13 −13 src/server/services/CMakeLists.txt
  114. +5 −5 src/server/services/DummyService/CMakeLists.txt
  115. +6 −6 src/server/services/landingpage/CMakeLists.txt
  116. +6 −6 src/server/services/wcs/CMakeLists.txt
  117. +7 −7 src/server/services/wfs/CMakeLists.txt
  118. +6 −6 src/server/services/wfs3/CMakeLists.txt
  119. +7 −7 src/server/services/wms/CMakeLists.txt
  120. +7 −7 src/server/services/wmts/CMakeLists.txt
  121. +3 −3 src/test/CMakeLists.txt
  122. +17 −17 src/ui/CMakeLists.txt
  123. +7 −7 tests/CMakeLists.txt
  124. +16 −16 tests/bench/CMakeLists.txt
  125. +17 −17 tests/code_layout/CMakeLists.txt
  126. +14 −14 tests/src/3d/CMakeLists.txt
  127. +40 −40 tests/src/CMakeLists.txt
  128. +22 −22 tests/src/analysis/CMakeLists.txt
  129. +22 −22 tests/src/app/CMakeLists.txt
  130. +18 −18 tests/src/auth/CMakeLists.txt
  131. +25 −25 tests/src/core/CMakeLists.txt
  132. +15 −15 tests/src/geometry_checker/CMakeLists.txt
  133. +34 −34 tests/src/gui/CMakeLists.txt
  134. +23 −23 tests/src/native/CMakeLists.txt
  135. +35 −35 tests/src/providers/CMakeLists.txt
  136. +2 −2 tests/src/providers/grass/6/CMakeLists.txt
  137. +1 −1 tests/src/providers/grass/7/CMakeLists.txt
  138. +47 −47 tests/src/providers/grass/CMakeLists.txt
  139. +21 −21 tests/src/python/CMakeLists.txt
  140. +10 −10 tests/src/quickgui/CMakeLists.txt
  141. +13 −13 tests/src/quickgui/app/CMakeLists.txt
  142. +17 −17 tests/src/server/CMakeLists.txt
  143. +16 −16 tests/src/server/wms/CMakeLists.txt

Large diffs are not rendered by default.

@@ -1,10 +1,10 @@
# include doxygen documentation
SET (WITH_APIDOC FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be built")
set (WITH_APIDOC FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be built")

# include Qt documentation
SET (QT_DOC_URL "https://doc.qt.io/qt-5/" CACHE STRING "URL for Qt docs")
set (QT_DOC_URL "https://doc.qt.io/qt-5/" CACHE STRING "URL for Qt docs")

SET(QGIS_DOC_FILES
set(QGIS_DOC_FILES
../INSTALL.md
../NEWS.md
NEWS.html
@@ -21,33 +21,33 @@ SET(QGIS_DOC_FILES
LICENSE
)

INSTALL(FILES ${QGIS_DOC_FILES} DESTINATION ${QGIS_DATA_DIR}/doc)
INSTALL(FILES ../images/icons/qgis-icon-60x60.png DESTINATION ${QGIS_DATA_DIR}/doc/images)
install(FILES ${QGIS_DOC_FILES} DESTINATION ${QGIS_DATA_DIR}/doc)
install(FILES ../images/icons/qgis-icon-60x60.png DESTINATION ${QGIS_DATA_DIR}/doc/images)

# Sponsor images
FILE (GLOB SPONSOR_IMAGES images/projects/thumbnails/* )
INSTALL (FILES ${SPONSOR_IMAGES} DESTINATION ${QGIS_DATA_DIR}/doc/images/projects/thumbnails/)
file (GLOB SPONSOR_IMAGES images/projects/thumbnails/* )
install (FILES ${SPONSOR_IMAGES} DESTINATION ${QGIS_DATA_DIR}/doc/images/projects/thumbnails/)

IF(WITH_APIDOC)
FIND_PACKAGE(Doxygen 1.8.2 REQUIRED)
IF(DOXYGEN_FOUND)
SET(QHP_FILES ${CMAKE_CURRENT_BINARY_DIR}/api/html/index.qhp)
if(WITH_APIDOC)
find_package(Doxygen 1.8.2 REQUIRED)
if(DOXYGEN_FOUND)
set(QHP_FILES ${CMAKE_CURRENT_BINARY_DIR}/api/html/index.qhp)

# Whether to generate QHP file
SET (GENERATE_QHP FALSE CACHE BOOL "Determines whether to generate Qt QHP help from the QGIS API Docs")
IF (GENERATE_QHP)
SET(WITH_QHP YES)
SET(QHP_FILES ${QHP_FILES} ${CMAKE_CURRENT_BINARY_DIR}/api/qch/qgis.qch)
ELSE(GENERATE_QHP)
SET(WITH_QHP NO)
ENDIF(GENERATE_QHP)

SET(DOXYGEN_INCLUDE_PATH
set (GENERATE_QHP FALSE CACHE BOOL "Determines whether to generate Qt QHP help from the QGIS API Docs")
if (GENERATE_QHP)
set(WITH_QHP YES)
set(QHP_FILES ${QHP_FILES} ${CMAKE_CURRENT_BINARY_DIR}/api/qch/qgis.qch)
else()
set(WITH_QHP NO)
endif()

set(DOXYGEN_INCLUDE_PATH
${CMAKE_SOURCE_DIR}/src/core
)
STRING(REPLACE ";" " " DOXYGEN_INCLUDE_PATH "${DOXYGEN_INCLUDE_PATH}")
string(REPLACE ";" " " DOXYGEN_INCLUDE_PATH "${DOXYGEN_INCLUDE_PATH}")

SET(DOXYGEN_INPUT
set(DOXYGEN_INPUT
${CMAKE_SOURCE_DIR}/doc
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/3d
@@ -119,55 +119,55 @@ IF(WITH_APIDOC)
${CMAKE_SOURCE_DIR}/src/quickgui/plugin
)

IF(WITH_SERVER)
SET(DOXYGEN_INPUT
if(WITH_SERVER)
set(DOXYGEN_INPUT
${DOXYGEN_INPUT}
${CMAKE_SOURCE_DIR}/src/server/
${CMAKE_SOURCE_DIR}/src/server/services/
${CMAKE_SOURCE_DIR}/src/server/services/wms
${CMAKE_SOURCE_DIR}/src/server/services/wfs
${CMAKE_SOURCE_DIR}/src/server/services/wcs
)
ENDIF(WITH_SERVER)
endif()

SET(DOXYGEN_FILE_PATTERNS *.h *.cpp *.dox)
set(DOXYGEN_FILE_PATTERNS *.h *.cpp *.dox)

SET(DOXYGEN_FILES)
FOREACH(_dir ${DOXYGEN_INPUT})
FOREACH(_pattern ${DOXYGEN_FILE_PATTERNS})
FILE(GLOB_RECURSE _files ${_dir}/${_pattern})
LIST(APPEND DOXYGEN_FILES ${_files})
ENDFOREACH(_pattern)
ENDFOREACH(_dir)
set(DOXYGEN_FILES)
foreach(_dir ${DOXYGEN_INPUT})
foreach(_pattern ${DOXYGEN_FILE_PATTERNS})
file(GLOB_RECURSE _files ${_dir}/${_pattern})
list(APPEND DOXYGEN_FILES ${_files})
endforeach(_pattern)
endforeach(_dir)

STRING(REPLACE ";" " " DOXYGEN_INPUT "${DOXYGEN_INPUT}")
string(REPLACE ";" " " DOXYGEN_INPUT "${DOXYGEN_INPUT}")

CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake_templates/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/cmake_templates/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)

SET (DOXYGEN_ON_DEMAND FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be build on demand only")
set (DOXYGEN_ON_DEMAND FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be build on demand only")

IF(DOXYGEN_ON_DEMAND)
ADD_CUSTOM_TARGET(apidoc DEPENDS ${QHP_FILES})
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/api/html/ DESTINATION ${QGIS_DATA_DIR}/doc/api OPTIONAL)
ELSE(DOXYGEN_ON_DEMAND)
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/api/html/ DESTINATION ${QGIS_DATA_DIR}/doc/api)
ADD_CUSTOM_TARGET(apidoc ALL DEPENDS ${QHP_FILES})
ENDIF(DOXYGEN_ON_DEMAND)
ADD_CUSTOM_COMMAND(
if(DOXYGEN_ON_DEMAND)
add_custom_target(apidoc DEPENDS ${QHP_FILES})
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/api/html/ DESTINATION ${QGIS_DATA_DIR}/doc/api OPTIONAL)
else()
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/api/html/ DESTINATION ${QGIS_DATA_DIR}/doc/api)
add_custom_target(apidoc ALL DEPENDS ${QHP_FILES})
endif()
add_custom_command(
OUTPUT ${QHP_FILES}
DEPENDS ${DOXYGEN_FILES}
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation" VERBATIM)
INSTALL(FILES ../images/icons/qgis-icon-60x60.png DESTINATION ${QGIS_DATA_DIR}/doc/api)
IF(GENERATE_QHP)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/api/qch/qgis.qch DESTINATION ${QGIS_DATA_DIR}/doc/api)
ENDIF(GENERATE_QHP)
SET(WITH_DOT YES CACHE STRING "Determines if the dot application should be used to generate class diagrams for the documentation")
MARK_AS_ADVANCED(WITH_DOT)
ELSE(DOXYGEN_FOUND)
MESSAGE(STATUS "QGIS api documentation not built - Doxygen not found")
ENDIF(DOXYGEN_FOUND)
ENDIF(WITH_APIDOC)
install(FILES ../images/icons/qgis-icon-60x60.png DESTINATION ${QGIS_DATA_DIR}/doc/api)
if(GENERATE_QHP)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/api/qch/qgis.qch DESTINATION ${QGIS_DATA_DIR}/doc/api)
endif()
set(WITH_DOT YES CACHE STRING "Determines if the dot application should be used to generate class diagrams for the documentation")
mark_as_advanced(WITH_DOT)
else()
message(STATUS "QGIS api documentation not built - Doxygen not found")
endif()
endif()

#SUBDIRS (images plugins install_guide)
@@ -1,4 +1,4 @@
SET(ASTYLE_SRCS
set(ASTYLE_SRCS
astyle_main.cpp
ASBeautifier.cpp
ASEnhancer.cpp
@@ -8,8 +8,8 @@ SET(ASTYLE_SRCS
)

# No warnings for astyle build
IF(NOT MSVC)
SET_SOURCE_FILES_PROPERTIES(${ASTYLE_SRCS} PROPERTIES COMPILE_FLAGS -w)
ENDIF(NOT MSVC)
ADD_EXECUTABLE(qgisstyle ${ASTYLE_SRCS})
SET_TARGET_PROPERTIES(qgisstyle PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/scripts)
if(NOT MSVC)
set_source_files_properties(${ASTYLE_SRCS} PROPERTIES COMPILE_FLAGS -w)
endif()
add_executable(qgisstyle ${ASTYLE_SRCS})
set_target_properties(qgisstyle PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/scripts)
@@ -1,16 +1,16 @@
INCLUDE_DIRECTORIES(
include_directories(
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/geometry

${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/core/geometry
)

INCLUDE_DIRECTORIES(SYSTEM
include_directories(SYSTEM
${Qt5Core_INCLUDE_DIRS}
)

ADD_LIBRARY(libdxfrw STATIC
add_library(libdxfrw STATIC
drw_classes.cpp
drw_entities.cpp
drw_header.cpp
@@ -31,11 +31,11 @@ ADD_LIBRARY(libdxfrw STATIC
intern/dxfwriter.cpp
intern/rscodec.cpp
)
SET_PROPERTY(TARGET libdxfrw PROPERTY POSITION_INDEPENDENT_CODE ON)
set_property(TARGET libdxfrw PROPERTY POSITION_INDEPENDENT_CODE ON)

IF(FALSE)
IF(DOXYGEN_FOUND)
ADD_CUSTOM_TARGET(doxygen-dxfrw ALL
if(FALSE)
if(DOXYGEN_FOUND)
add_custom_target(doxygen-dxfrw ALL
COMMAND ${DOXYGEN_EXECUTABLE} libdxfrw.dox
drw_base.h
drw_classes.cpp
@@ -85,5 +85,5 @@ IF(DOXYGEN_FOUND)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS libdxfrw
COMMENT "Generating libdxfrw documentation" VERBATIM)
ENDIF(DOXYGEN_FOUND)
ENDIF(FALSE)
endif()
endif()
@@ -160,7 +160,7 @@ if(o2_WITH_KEYCHAIN)
find_package(QtKeychain REQUIRED)
endif()
if(QTKEYCHAIN_FOUND OR QT5KEYCHAIN_FOUND)
MESSAGE("Found QTKeychain")
message("Found QTKeychain")
list(APPEND LINK_TARGETS ${QTKEYCHAIN_LIBRARY})
include_directories(${QTKEYCHAIN_INCLUDE_DIR})
set( o2_SRCS
@@ -172,7 +172,7 @@ if(o2_WITH_KEYCHAIN)
o0keychainstore.h
)
else()
MESSAGE("Qt5Keychain or QtKeychain is required")
message("Qt5Keychain or QtKeychain is required")
endif()


@@ -1,29 +1,29 @@
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR}/sqldrivers)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR}/sqldrivers)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR}/sqldrivers)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR}/sqldrivers)

ADD_DEFINITIONS(${QT_DEFINITIONS})
ADD_DEFINITIONS(-DQT_PLUGIN)
ADD_DEFINITIONS(-DQT_NO_DEBUG)
ADD_DEFINITIONS(-DQT_SHARED)
add_definitions(${QT_DEFINITIONS})
add_definitions(-DQT_PLUGIN)
add_definitions(-DQT_NO_DEBUG)
add_definitions(-DQT_SHARED)

INCLUDE_DIRECTORIES(SYSTEM
include_directories(SYSTEM
${SQLITE3_INCLUDE_DIR}
${Qt5Sql_PRIVATE_INCLUDE_DIRS}
)

SET(QSQLSPATIALITE_SRC qsql_spatialite.cpp smain.cpp)
set(QSQLSPATIALITE_SRC qsql_spatialite.cpp smain.cpp)
QT5_WRAP_CPP(QSQLSPATIALITE_SRC qsql_spatialite.h smain.h)

ADD_LIBRARY(qsqlspatialite SHARED ${QSQLSPATIALITE_SRC})
TARGET_LINK_LIBRARIES(qsqlspatialite
add_library(qsqlspatialite SHARED ${QSQLSPATIALITE_SRC})
target_link_libraries(qsqlspatialite
${Qt5Core_LIBRARIES}
${Qt5Sql_LIBRARIES}
${SQLITE3_LIBRARY}
${SPATIALITE_LIBRARY}
qgis_core
)

INSTALL(TARGETS qsqlspatialite
install(TARGETS qsqlspatialite
RUNTIME DESTINATION ${QT_PLUGINS_DIR}/sqldrivers
LIBRARY DESTINATION ${QT_PLUGINS_DIR}/sqldrivers
)
@@ -1,21 +1,21 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
cmake_minimum_required(VERSION 2.8.3)

CMAKE_POLICY (SET CMP0048 NEW)
cmake_policy (SET CMP0048 NEW)

project(QTSignals VERSION 0.1)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

SET(QTSignal_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "QTSignal Include Dir")
set(QTSignal_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "QTSignal Include Dir")

find_package(Qt5Core REQUIRED)

if (Qt5_POSITION_INDEPENDENT_CODE)
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif(Qt5_POSITION_INDEPENDENT_CODE)

SET(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)

option(CMAKE_ENABLE "Enable automatic path configuration" ON)

@@ -24,7 +24,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)

UNSET(CMAKE_CXX_VISIBILITY_PRESET)
unset(CMAKE_CXX_VISIBILITY_PRESET)

include_directories(${Qt5Core_INCLUDE_DIRS})
add_library(QTSignal STATIC sigwatch.cpp)
@@ -1,32 +1,32 @@
FIND_PROGRAM(QT_LRELEASE_EXECUTABLE NAMES lrelease-qt5 lrelease)
find_program(QT_LRELEASE_EXECUTABLE NAMES lrelease-qt5 lrelease)

MACRO(ADD_TRANSLATION_FILES _sources )
FOREACH (_current_FILE ${ARGN})
GET_FILENAME_COMPONENT(_in ${_current_FILE} ABSOLUTE)
GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME_WE)
macro(ADD_TRANSLATION_FILES _sources )
foreach (_current_FILE ${ARGN})
get_filename_component(_in ${_current_FILE} ABSOLUTE)
get_filename_component(_basename ${_current_FILE} NAME_WE)

SET(_out ${QGIS_OUTPUT_DIRECTORY}/i18n/${_basename}.qm)
set(_out ${QGIS_OUTPUT_DIRECTORY}/i18n/${_basename}.qm)

ADD_CUSTOM_COMMAND(
add_custom_command(
OUTPUT ${_out}
COMMAND ${QT_LRELEASE_EXECUTABLE}
ARGS -silent ${_in} -qm ${_out}
DEPENDS ${_in}
)

SET(${_sources} ${${_sources}} ${_out} )
ENDFOREACH (_current_FILE)
ENDMACRO(ADD_TRANSLATION_FILES)
set(${_sources} ${${_sources}} ${_out} )
endforeach (_current_FILE)
endmacro(ADD_TRANSLATION_FILES)

# make sure the output directory exists
FILE(MAKE_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/i18n)
file(MAKE_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/i18n)

SET(TS_FILES qgis_ar.ts qgis_bg.ts qgis_bs.ts qgis_ca.ts qgis_cs.ts qgis_da.ts qgis_de.ts qgis_el.ts qgis_es.ts qgis_et.ts qgis_eu.ts qgis_fi.ts qgis_fr.ts qgis_gl.ts qgis_hu.ts qgis_is.ts qgis_it.ts qgis_ja.ts qgis_ko.ts qgis_ky.ts qgis_lt.ts qgis_lv.ts qgis_nb.ts qgis_nl.ts qgis_pl.ts qgis_pt_BR.ts qgis_pt_PT.ts qgis_ro.ts qgis_ru.ts qgis_sv.ts qgis_uk.ts qgis_vi.ts qgis_zh-Hans.ts qgis_zh-Hant.ts)
set(TS_FILES qgis_ar.ts qgis_bg.ts qgis_bs.ts qgis_ca.ts qgis_cs.ts qgis_da.ts qgis_de.ts qgis_el.ts qgis_es.ts qgis_et.ts qgis_eu.ts qgis_fi.ts qgis_fr.ts qgis_gl.ts qgis_hu.ts qgis_is.ts qgis_it.ts qgis_ja.ts qgis_ko.ts qgis_ky.ts qgis_lt.ts qgis_lv.ts qgis_nb.ts qgis_nl.ts qgis_pl.ts qgis_pt_BR.ts qgis_pt_PT.ts qgis_ro.ts qgis_ru.ts qgis_sv.ts qgis_uk.ts qgis_vi.ts qgis_zh-Hans.ts qgis_zh-Hant.ts)

ADD_TRANSLATION_FILES (QM_FILES ${TS_FILES})

IF (UNIX AND NOT APPLE AND PYQT5_FOUND)
ADD_CUSTOM_COMMAND(
if (UNIX AND NOT APPLE AND PYQT5_FOUND)
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/org.qgis.qgis.desktop ${CMAKE_BINARY_DIR}/org.qgis.qgis.appdata.xml
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
COMMAND ${PYTHON_EXECUTABLE}
@@ -35,20 +35,20 @@ IF (UNIX AND NOT APPLE AND PYQT5_FOUND)
DEPENDS ${QM_FILES} ${CMAKE_SOURCE_DIR}/linux/org.qgis.qgis.desktop.in ${CMAKE_SOURCE_DIR}/linux/org.qgis.qgis.appdata.xml.in
)

SET(MD_FILES ${CMAKE_BINARY_DIR}/org.qgis.qgis.desktop ${CMAKE_BINARY_DIR}/org.qgis.qgis.appdata.xml)
set(MD_FILES ${CMAKE_BINARY_DIR}/org.qgis.qgis.desktop ${CMAKE_BINARY_DIR}/org.qgis.qgis.appdata.xml)

INSTALL(FILES ${CMAKE_BINARY_DIR}/org.qgis.qgis.desktop DESTINATION share/applications)
INSTALL(FILES ${CMAKE_BINARY_DIR}/org.qgis.qgis.appdata.xml DESTINATION share/metainfo)
ENDIF (UNIX AND NOT APPLE AND PYQT5_FOUND)
install(FILES ${CMAKE_BINARY_DIR}/org.qgis.qgis.desktop DESTINATION share/applications)
install(FILES ${CMAKE_BINARY_DIR}/org.qgis.qgis.appdata.xml DESTINATION share/metainfo)
endif()

# creating a custom target is needed to make the files build
# "ALL" means that it will be run by default
ADD_CUSTOM_TARGET (translations ALL DEPENDS ${QM_FILES} ${MD_FILES})
add_custom_target (translations ALL DEPENDS ${QM_FILES} ${MD_FILES})

# first compile sources, then compile translations
IF (WITH_DESKTOP)
ADD_DEPENDENCIES (translations ${QGIS_APP_NAME})
ENDIF (WITH_DESKTOP)
if (WITH_DESKTOP)
add_dependencies (translations ${QGIS_APP_NAME})
endif()

INSTALL (FILES ${QM_FILES}
install (FILES ${QM_FILES}
DESTINATION ${QGIS_DATA_DIR}/i18n)

0 comments on commit 4358617

Please sign in to comment.
You can’t perform that action at this time.