Skip to content
Permalink
Browse files

modernize CMakeLists.txt files

  • Loading branch information
3nids authored and nyalldawson committed Nov 11, 2020
1 parent c7ed320 commit eddf6feb4518da3ed5bb6d8f4ece532e61832754
Showing with 3,418 additions and 3,418 deletions.
  1. +694 −694 CMakeLists.txt
  2. +65 −65 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. +54 −54 src/analysis/CMakeLists.txt
  64. +160 −160 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. +145 −145 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. +77 −77 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. +29 −29 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. +17 −17 src/providers/pdal/CMakeLists.txt
  104. +42 −42 src/providers/postgres/CMakeLists.txt
  105. +21 −21 src/providers/spatialite/CMakeLists.txt
  106. +22 −22 src/providers/virtual/CMakeLists.txt
  107. +12 −12 src/providers/wcs/CMakeLists.txt
  108. +16 −16 src/providers/wfs/CMakeLists.txt
  109. +31 −31 src/providers/wms/CMakeLists.txt
  110. +13 −13 src/python/CMakeLists.txt
  111. +25 −25 src/quickgui/CMakeLists.txt
  112. +33 −33 src/quickgui/plugin/CMakeLists.txt
  113. +45 −45 src/server/CMakeLists.txt
  114. +13 −13 src/server/services/CMakeLists.txt
  115. +5 −5 src/server/services/DummyService/CMakeLists.txt
  116. +6 −6 src/server/services/landingpage/CMakeLists.txt
  117. +6 −6 src/server/services/wcs/CMakeLists.txt
  118. +7 −7 src/server/services/wfs/CMakeLists.txt
  119. +6 −6 src/server/services/wfs3/CMakeLists.txt
  120. +7 −7 src/server/services/wms/CMakeLists.txt
  121. +7 −7 src/server/services/wmts/CMakeLists.txt
  122. +3 −3 src/test/CMakeLists.txt
  123. +18 −18 src/ui/CMakeLists.txt
  124. +7 −7 tests/CMakeLists.txt
  125. +16 −16 tests/bench/CMakeLists.txt
  126. +17 −17 tests/code_layout/CMakeLists.txt
  127. +15 −15 tests/src/3d/CMakeLists.txt
  128. +8 −8 tests/src/3d/sandbox/CMakeLists.txt
  129. +40 −40 tests/src/CMakeLists.txt
  130. +22 −22 tests/src/analysis/CMakeLists.txt
  131. +22 −22 tests/src/app/CMakeLists.txt
  132. +18 −18 tests/src/auth/CMakeLists.txt
  133. +25 −25 tests/src/core/CMakeLists.txt
  134. +15 −15 tests/src/geometry_checker/CMakeLists.txt
  135. +34 −34 tests/src/gui/CMakeLists.txt
  136. +23 −23 tests/src/native/CMakeLists.txt
  137. +42 −42 tests/src/providers/CMakeLists.txt
  138. +2 −2 tests/src/providers/grass/6/CMakeLists.txt
  139. +1 −1 tests/src/providers/grass/7/CMakeLists.txt
  140. +47 −47 tests/src/providers/grass/CMakeLists.txt
  141. +21 −21 tests/src/python/CMakeLists.txt
  142. +10 −10 tests/src/quickgui/CMakeLists.txt
  143. +13 −13 tests/src/quickgui/app/CMakeLists.txt
  144. +17 −17 tests/src/server/CMakeLists.txt
  145. +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
@@ -122,60 +122,60 @@ 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)

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)

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

IF(WERROR)
SET (DOXYGEN_WARN_AS_ERROR "YES")
ELSE(WERROR)
SET (DOXYGEN_WARN_AS_ERROR "NO")
ENDIF(WERROR)
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 built on demand through the target apidoc only. If set to false it is added to the target ALL.")

IF(DOXYGEN_ON_DEMAND)
ADD_CUSTOM_TARGET(apidoc DEPENDS ${QHP_FILES} version)
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} version)
ENDIF(DOXYGEN_ON_DEMAND)
ADD_CUSTOM_COMMAND(
endif()

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)

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

if(WERROR)
set (DOXYGEN_WARN_AS_ERROR "YES")
else()
set (DOXYGEN_WARN_AS_ERROR "NO")
endif()
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 built on demand through the target apidoc only. If set to false it is added to the target ALL.")

if(DOXYGEN_ON_DEMAND)
add_custom_target(apidoc DEPENDS ${QHP_FILES} version)
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} version)
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 eddf6fe

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