Skip to content
Permalink
Browse files

Merge pull request #40004 from 3nids/modern-cmake-316

modernize cmakelists
  • Loading branch information
3nids committed Nov 13, 2020
2 parents c441088 + b5e9df9 commit 495feea82833cbea08cdd511474c3b84341c51f0
Showing with 3,445 additions and 3,332 deletions.
  1. +3 −3 .ci/azure-pipelines/azure-pipelines.yml
  2. +666 −666 CMakeLists.txt
  3. +3 −3 debian/rules
  4. +54 −54 doc/CMakeLists.txt
  5. +6 −6 external/astyle/CMakeLists.txt
  6. +9 −9 external/libdxfrw/CMakeLists.txt
  7. +2 −2 external/o2/src/CMakeLists.txt
  8. +11 −11 external/qspatialite/CMakeLists.txt
  9. +6 −6 external/qt-unix-signals/CMakeLists.txt
  10. +23 −23 i18n/CMakeLists.txt
  11. +3 −3 images/CMakeLists.txt
  12. +6 −6 images/icons/CMakeLists.txt
  13. +4 −4 images/icons/mac/CMakeLists.txt
  14. +7 −7 images/svg/CMakeLists.txt
  15. +3 −3 images/themes/default/CMakeLists.txt
  16. +23 −23 mac/CMakeLists.txt
  17. +4 −4 ms-windows/osgeo4w/creatensis.pl
  18. +8 −8 postinstall/CMakeLists.txt
  19. +192 −192 python/CMakeLists.txt
  20. +12 −12 python/PyQt/CMakeLists.txt
  21. +9 −9 python/console/CMakeLists.txt
  22. +14 −14 python/ext-libs/CMakeLists.txt
  23. +31 −31 python/plugins/CMakeLists.txt
  24. +10 −10 python/plugins/MetaSearch/CMakeLists.txt
  25. +5 −5 python/plugins/db_manager/CMakeLists.txt
  26. +8 −8 python/plugins/db_manager/db_plugins/CMakeLists.txt
  27. +1 −1 python/plugins/db_manager/db_plugins/gpkg/CMakeLists.txt
  28. +1 −1 python/plugins/db_manager/db_plugins/oracle/CMakeLists.txt
  29. +7 −7 python/plugins/db_manager/db_plugins/postgis/CMakeLists.txt
  30. +2 −2 python/plugins/db_manager/db_plugins/postgis/plugins/CMakeLists.txt
  31. +2 −2 python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/CMakeLists.txt
  32. +1 −1 python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/templates/CMakeLists.txt
  33. +2 −2 python/plugins/db_manager/db_plugins/postgis/plugins/versioning/CMakeLists.txt
  34. +1 −1 python/plugins/db_manager/db_plugins/spatialite/CMakeLists.txt
  35. +1 −1 python/plugins/db_manager/db_plugins/vlayers/CMakeLists.txt
  36. +1 −1 python/plugins/db_manager/icons/CMakeLists.txt
  37. +13 −13 python/plugins/processing/CMakeLists.txt
  38. +7 −7 python/plugins/processing/algs/CMakeLists.txt
  39. +2 −2 python/plugins/processing/algs/gdal/CMakeLists.txt
  40. +2 −2 python/plugins/processing/algs/gdal/ui/CMakeLists.txt
  41. +4 −4 python/plugins/processing/algs/grass7/CMakeLists.txt
  42. +1 −1 python/plugins/processing/algs/grass7/ext/CMakeLists.txt
  43. +2 −2 python/plugins/processing/algs/help/CMakeLists.txt
  44. +1 −1 python/plugins/processing/algs/otb/CMakeLists.txt
  45. +2 −2 python/plugins/processing/algs/qgis/CMakeLists.txt
  46. +2 −2 python/plugins/processing/algs/qgis/ui/CMakeLists.txt
  47. +3 −3 python/plugins/processing/algs/saga/CMakeLists.txt
  48. +1 −1 python/plugins/processing/algs/saga/ext/CMakeLists.txt
  49. +1 −1 python/plugins/processing/core/CMakeLists.txt
  50. +2 −2 python/plugins/processing/gui/CMakeLists.txt
  51. +2 −2 python/plugins/processing/images/CMakeLists.txt
  52. +1 −1 python/plugins/processing/images/gdaltools/CMakeLists.txt
  53. +2 −2 python/plugins/processing/modeler/CMakeLists.txt
  54. +1 −1 python/plugins/processing/preconfigured/CMakeLists.txt
  55. +1 −1 python/plugins/processing/script/CMakeLists.txt
  56. +11 −11 python/plugins/processing/tests/CMakeLists.txt
  57. +1 −1 python/plugins/processing/tools/CMakeLists.txt
  58. +1 −1 python/plugins/processing/ui/CMakeLists.txt
  59. +10 −10 python/processing/CMakeLists.txt
  60. +10 −10 python/pyplugin_installer/CMakeLists.txt
  61. +3 −3 python/qsci_apis/CMakeLists.txt
  62. +9 −9 python/testing/CMakeLists.txt
  63. +29 −29 resources/CMakeLists.txt
  64. +3 −3 rpm/buildrpms.sh
  65. +113 −0 scripts/modernize-cmake.sh
  66. +8 −8 scripts/release.pl
  67. +1 −1 scripts/sip_include.sh
  68. +2 −2 scripts/tsstat.pl
  69. +31 −31 src/3d/CMakeLists.txt
  70. +51 −51 src/CMakeLists.txt
  71. +51 −51 src/analysis/CMakeLists.txt
  72. +154 −154 src/app/CMakeLists.txt
  73. +11 −11 src/auth/CMakeLists.txt
  74. +10 −10 src/auth/basic/CMakeLists.txt
  75. +10 −10 src/auth/esritoken/CMakeLists.txt
  76. +10 −10 src/auth/identcert/CMakeLists.txt
  77. +49 −49 src/auth/oauth2/CMakeLists.txt
  78. +10 −10 src/auth/pkipaths/CMakeLists.txt
  79. +10 −10 src/auth/pkipkcs12/CMakeLists.txt
  80. +125 −125 src/core/CMakeLists.txt
  81. +7 −7 src/crashhandler/CMakeLists.txt
  82. +17 −17 src/crssync/CMakeLists.txt
  83. +23 −23 src/customwidgets/CMakeLists.txt
  84. +72 −72 src/gui/CMakeLists.txt
  85. +69 −69 src/native/CMakeLists.txt
  86. +16 −16 src/plugins/CMakeLists.txt
  87. +9 −9 src/plugins/geometry_checker/CMakeLists.txt
  88. +7 −7 src/plugins/gps_importer/CMakeLists.txt
  89. +2 −2 src/plugins/grass/6/CMakeLists.txt
  90. +1 −1 src/plugins/grass/7/CMakeLists.txt
  91. +71 −71 src/plugins/grass/CMakeLists.txt
  92. +4 −4 src/plugins/grass/modules/CMakeLists.txt
  93. +4 −4 src/plugins/grass/scripts/CMakeLists.txt
  94. +8 −8 src/plugins/offline_editing/CMakeLists.txt
  95. +8 −8 src/plugins/topology/CMakeLists.txt
  96. +23 −23 src/process/CMakeLists.txt
  97. +26 −26 src/providers/CMakeLists.txt
  98. +31 −31 src/providers/arcgisrest/CMakeLists.txt
  99. +18 −18 src/providers/db2/CMakeLists.txt
  100. +17 −17 src/providers/delimitedtext/CMakeLists.txt
  101. +17 −17 src/providers/geonode/CMakeLists.txt
  102. +6 −6 src/providers/gpx/CMakeLists.txt
  103. +2 −2 src/providers/grass/6/CMakeLists.txt
  104. +2 −2 src/providers/grass/7/CMakeLists.txt
  105. +172 −172 src/providers/grass/CMakeLists.txt
  106. +87 −87 src/providers/mdal/CMakeLists.txt
  107. +17 −17 src/providers/mssql/CMakeLists.txt
  108. +18 −18 src/providers/oracle/CMakeLists.txt
  109. +16 −16 src/providers/oracle/ocispatial/CMakeLists.txt
  110. +9 −9 src/providers/ows/CMakeLists.txt
  111. +42 −42 src/providers/postgres/CMakeLists.txt
  112. +21 −21 src/providers/spatialite/CMakeLists.txt
  113. +22 −22 src/providers/virtual/CMakeLists.txt
  114. +12 −12 src/providers/wcs/CMakeLists.txt
  115. +16 −16 src/providers/wfs/CMakeLists.txt
  116. +31 −31 src/providers/wms/CMakeLists.txt
  117. +13 −13 src/python/CMakeLists.txt
  118. +25 −25 src/quickgui/CMakeLists.txt
  119. +33 −33 src/quickgui/plugin/CMakeLists.txt
  120. +45 −45 src/server/CMakeLists.txt
  121. +13 −13 src/server/services/CMakeLists.txt
  122. +5 −5 src/server/services/DummyService/CMakeLists.txt
  123. +6 −6 src/server/services/landingpage/CMakeLists.txt
  124. +6 −6 src/server/services/wcs/CMakeLists.txt
  125. +7 −7 src/server/services/wfs/CMakeLists.txt
  126. +6 −6 src/server/services/wfs3/CMakeLists.txt
  127. +7 −7 src/server/services/wms/CMakeLists.txt
  128. +7 −7 src/server/services/wmts/CMakeLists.txt
  129. +3 −3 src/test/CMakeLists.txt
  130. +17 −17 src/ui/CMakeLists.txt
  131. +7 −7 tests/CMakeLists.txt
  132. +16 −16 tests/bench/CMakeLists.txt
  133. +17 −17 tests/code_layout/CMakeLists.txt
  134. +14 −14 tests/src/3d/CMakeLists.txt
  135. +40 −40 tests/src/CMakeLists.txt
  136. +22 −22 tests/src/analysis/CMakeLists.txt
  137. +22 −22 tests/src/app/CMakeLists.txt
  138. +18 −18 tests/src/auth/CMakeLists.txt
  139. +25 −25 tests/src/core/CMakeLists.txt
  140. +15 −15 tests/src/geometry_checker/CMakeLists.txt
  141. +34 −34 tests/src/gui/CMakeLists.txt
  142. +23 −23 tests/src/native/CMakeLists.txt
  143. +35 −35 tests/src/providers/CMakeLists.txt
  144. +2 −2 tests/src/providers/grass/6/CMakeLists.txt
  145. +1 −1 tests/src/providers/grass/7/CMakeLists.txt
  146. +47 −47 tests/src/providers/grass/CMakeLists.txt
  147. +21 −21 tests/src/python/CMakeLists.txt
  148. +10 −10 tests/src/quickgui/CMakeLists.txt
  149. +13 −13 tests/src/quickgui/app/CMakeLists.txt
  150. +17 −17 tests/src/server/CMakeLists.txt
  151. +16 −16 tests/src/server/wms/CMakeLists.txt
@@ -71,9 +71,9 @@ jobs:
esac
target=Experimental
major=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")\s*$/\1/p' CMakeLists.txt)
minor=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")\s*$/\1/p' CMakeLists.txt)
patch=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")\s*$/\1/p' CMakeLists.txt)
major=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")\s*$/\1/ip' CMakeLists.txt)
minor=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")\s*$/\1/ip' CMakeLists.txt)
patch=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")\s*$/\1/ip' CMakeLists.txt)
binary=$(curl --location-trusted http://ftp.osuosl.org/pub/osgeo/download/osgeo4w/$OSGEO4W_ARCH/release/qgis/$OSGEO4W_PKG/LATEST.sha | sed -e "s/:.*$//")
(( binary++ )) || true

Large diffs are not rendered by default.

@@ -46,9 +46,9 @@ endif

DEB_BUILD_NAME ?= $(DISTRIBUTION)-$(DEB_BUILD_ARCH)

QGIS_MAJOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")/\1/p' CMakeLists.txt)
QGIS_MINOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")/\1/p' CMakeLists.txt)
QGIS_PATCH=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")/\1/p' CMakeLists.txt)
QGIS_MAJOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")/\1/ip' CMakeLists.txt)
QGIS_MINOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")/\1/ip' CMakeLists.txt)
QGIS_PATCH=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")/\1/ip' CMakeLists.txt)
QGIS_ABI=$(QGIS_MAJOR).$(QGIS_MINOR).$(QGIS_PATCH)
GRASS=grass$(subst .,,$(shell pkg-config --modversion grass|cut -d. -f1,2))
GRASSVER=$(subst .,,$(shell pkg-config --modversion grass|cut -d. -f1))
@@ -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)

0 comments on commit 495feea

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