Skip to content
Permalink
Browse files
rename auth methods and providers targets (#43768)
* rename auth methods targets

* rename provider targets

* follow up

* fix dll/so lookup

* follow up

* more

* Update qgsauthmethodregistry.cpp

* Update qgsproviderregistry.cpp

* follow up

* fix missing method
  • Loading branch information
3nids committed Jun 19, 2021
1 parent f202c72 commit ad618e771826d7af5f65dea55f7362beb1c9db58
Showing with 247 additions and 251 deletions.
  1. +1 −1 CMakeLists.txt
  2. +1 −1 debian/libqgis-dev.install.in
  3. +5 −5 debian/qgis-providers.install
  4. +1 −1 debian/qgis.install
  5. +8 −8 ms-windows/osgeo4w/package.cmd
  6. +3 −3 rpm/qgis.spec.template
  7. +8 −8 src/auth/basic/CMakeLists.txt
  8. +8 −8 src/auth/esritoken/CMakeLists.txt
  9. +9 −9 src/auth/identcert/CMakeLists.txt
  10. +1 −1 src/auth/oauth2/CMakeLists.txt
  11. +9 −9 src/auth/pkipaths/CMakeLists.txt
  12. +9 −9 src/auth/pkipkcs12/CMakeLists.txt
  13. +2 −2 src/core/CMakeLists.txt
  14. +2 −3 src/core/auth/qgsauthmethodregistry.cpp
  15. +1 −1 src/core/providers/qgsproviderregistry.cpp
  16. +2 −2 src/gui/CMakeLists.txt
  17. +11 −11 src/providers/arcgisrest/CMakeLists.txt
  18. +6 −6 src/providers/db2/CMakeLists.txt
  19. +8 −8 src/providers/delimitedtext/CMakeLists.txt
  20. +8 −8 src/providers/geonode/CMakeLists.txt
  21. +4 −4 src/providers/gpx/CMakeLists.txt
  22. +7 −7 src/providers/grass/CMakeLists.txt
  23. +12 −12 src/providers/hana/CMakeLists.txt
  24. +18 −18 src/providers/mdal/CMakeLists.txt
  25. +6 −6 src/providers/mssql/CMakeLists.txt
  26. +6 −6 src/providers/oracle/CMakeLists.txt
  27. +13 −13 src/providers/pdal/CMakeLists.txt
  28. +28 −28 src/providers/postgres/CMakeLists.txt
  29. +7 −7 src/providers/spatialite/CMakeLists.txt
  30. +5 −5 src/providers/wcs/CMakeLists.txt
  31. +6 −6 src/providers/wfs/CMakeLists.txt
  32. +20 −20 src/providers/wms/CMakeLists.txt
  33. +2 −2 tests/src/auth/CMakeLists.txt
  34. +9 −12 tests/src/providers/CMakeLists.txt
  35. +1 −1 tests/src/quickgui/app/CMakeLists.txt
@@ -217,7 +217,7 @@ if(WITH_CORE)
# The qgis_desktop target is meant to build a minimal but complete running QGIS during development
# This should help to reduce compile time while still having a "complete enough" QGIS for most of the development
add_custom_target(qgis_desktop
DEPENDS qgis qgispython pycore pygui pyanalysis postgresprovider staged-plugins pyplugin-installer resources svg doc icons
DEPENDS qgis qgispython pycore pygui pyanalysis provider_postgres staged-plugins pyplugin-installer resources svg doc icons
)
endif()

@@ -9,6 +9,6 @@ usr/lib/libqgis_server.so
usr/lib/libqgisgrass?.so
usr/lib/libqgispython.so
usr/share/qgis/FindQGIS.cmake
usr/lib/*/liboauth2authmethod_static.a
usr/lib/*/libauthmethod_oauth2_static.a
#!sid#usr/share/sip/qgis
#sid#usr/lib/python?/*-packages/qgis
@@ -2,17 +2,17 @@ usr/lib/qgis/crssync
usr/lib/qgis/untwine
usr/lib/qgis/plugins/libarcgisfeatureserverprovider.so
usr/lib/qgis/plugins/libarcgismapserverprovider.so
usr/lib/qgis/plugins/libbasicauthmethod.so
usr/lib/qgis/plugins/libauthmethod_basic.so
usr/lib/qgis/plugins/libdb2provider.so
usr/lib/qgis/plugins/libdelimitedtextprovider.so
usr/lib/qgis/plugins/libesritokenauthmethod.so
usr/lib/qgis/plugins/libauthmethod_esritoken.so
usr/lib/qgis/plugins/libgeonodeprovider.so
usr/lib/qgis/plugins/libgpxprovider.so
usr/lib/qgis/plugins/libidentcertauthmethod.so
usr/lib/qgis/plugins/libauthmethod_identcert.so
usr/lib/qgis/plugins/libmdalprovider.so
usr/lib/qgis/plugins/libmssqlprovider.so
usr/lib/qgis/plugins/libpkcs12authmethod.so
usr/lib/qgis/plugins/libpkipathsauthmethod.so
usr/lib/qgis/plugins/libauthmethod_pkcs12.so
usr/lib/qgis/plugins/libauthmethod_pkipaths.so
usr/lib/qgis/plugins/libpostgresprovider.so
usr/lib/qgis/plugins/libpostgresrasterprovider.so
usr/lib/qgis/plugins/libspatialiteprovider.so
@@ -1,6 +1,6 @@
usr/lib/qgis/plugins/libgeometrycheckerplugin.so
usr/lib/qgis/plugins/libgpsimporterplugin.so
usr/lib/qgis/plugins/liboauth2authmethod.so
usr/lib/qgis/plugins/libauthmethod_oauth2.so
usr/lib/qgis/plugins/libofflineeditingplugin.so
usr/lib/qgis/plugins/libtopolplugin.so
usr/share/applications/
@@ -291,28 +291,28 @@ for %%i in (%packages%) do (
"apps/%PACKAGENAME%/bin/qgis_native.dll" ^
"apps/%PACKAGENAME%/bin/qgis_process.exe" ^
"apps/%PACKAGENAME%/doc/" ^
"apps/%PACKAGENAME%/plugins/basicauthmethod.dll" ^
"apps/%PACKAGENAME%/plugins/authmethod_basic.dll" ^
"apps/%PACKAGENAME%/plugins/delimitedtextprovider.dll" ^
"apps/%PACKAGENAME%/plugins/esritokenauthmethod.dll" ^
"apps/%PACKAGENAME%/plugins/authmethod_esritoken.dll" ^
"apps/%PACKAGENAME%/plugins/geonodeprovider.dll" ^
"apps/%PACKAGENAME%/plugins/gpxprovider.dll" ^
"apps/%PACKAGENAME%/plugins/identcertauthmethod.dll" ^
"apps/%PACKAGENAME%/plugins/authmethod_identcert.dll" ^
"apps/%PACKAGENAME%/plugins/mssqlprovider.dll" ^
"apps/%PACKAGENAME%/plugins/db2provider.dll" ^
"apps/%PACKAGENAME%/plugins/pkcs12authmethod.dll" ^
"apps/%PACKAGENAME%/plugins/pkipathsauthmethod.dll" ^
"apps/%PACKAGENAME%/plugins/authmethod_pkcs12.dll" ^
"apps/%PACKAGENAME%/plugins/authmethod_pkipaths.dll" ^
"apps/%PACKAGENAME%/plugins/postgresprovider.dll" ^
"apps/%PACKAGENAME%/plugins/postgresrasterprovider.dll" ^
"apps/%PACKAGENAME%/plugins/provider_postgresraster.dll" ^
"apps/%PACKAGENAME%/plugins/spatialiteprovider.dll" ^
"apps/%PACKAGENAME%/plugins/virtuallayerprovider.dll" ^
"apps/%PACKAGENAME%/plugins/wcsprovider.dll" ^
"apps/%PACKAGENAME%/plugins/wfsprovider.dll" ^
"apps/%PACKAGENAME%/plugins/wmsprovider.dll" ^
"apps/%PACKAGENAME%/plugins/arcgismapserverprovider.dll" ^
"apps/%PACKAGENAME%/plugins/arcgisfeatureserverprovider.dll" ^
"apps/%PACKAGENAME%/plugins/provider_arcgisfeatureserver.dll" ^
"apps/%PACKAGENAME%/plugins/mdalprovider.dll" ^
"apps/%PACKAGENAME%/plugins/hanaprovider.dll" ^
"apps/%PACKAGENAME%/plugins/oauth2authmethod.dll" ^
"apps/%PACKAGENAME%/plugins/authmethod_oauth2.dll" ^
"apps/%PACKAGENAME%/resources/qgis.db" ^
"apps/%PACKAGENAME%/resources/spatialite.db" ^
"apps/%PACKAGENAME%/resources/srs.db" ^
@@ -127,7 +127,7 @@ BuildRequires: qt5-qt3d-devel

# In F30+ qt5-qtbase-devel has been split
# in qt5-qtbase-devel and qt5-qtbase-private-devel
# qt5-qtbase-private-devel is needed by
# qt5-qtbase-private-devel is needed by
# external/qspatialite/qsql_spatialite.cpp:49:10
%if 0%{?fedora} >= 30
BuildRequires: qt5-qtbase-private-devel
@@ -316,13 +316,13 @@ rm -f %{buildroot}%{_datadir}/%{name}/doc/INSTALL*
%exclude %{_libdir}/%{name}/plugins/libgrassplugin*.so
%exclude %{_libdir}/%{name}/server/
%exclude %{_libdir}/%{name}/grass/
%exclude %{_prefix}/lib/liboauth2authmethod_static.a
%exclude %{_prefix}/lib/libauthmethod_oauth2_static.a

%files devel
%{_datadir}/%{name}/FindQGIS.cmake
%{_includedir}/%{name}/
%{_libdir}/lib%{name}*.so
%{_prefix}/lib/liboauth2authmethod_static.a
%{_prefix}/lib/lib_authmethod_oauth2_static.a
%{?_qt5_plugindir}/designer/libqgis_customwidgets.so*

%files grass
@@ -20,28 +20,28 @@ if (WITH_GUI)
QT5_WRAP_UI(AUTH_BASIC_UIS_H ${AUTH_BASIC_UIS})
endif()

add_library(basicauthmethod MODULE ${AUTH_BASIC_SRCS} ${AUTH_BASIC_HDRS} ${AUTH_BASIC_UIS_H})
add_library(authmethod_basic MODULE ${AUTH_BASIC_SRCS} ${AUTH_BASIC_HDRS} ${AUTH_BASIC_UIS_H})

target_include_directories(basicauthmethod PUBLIC
target_include_directories(authmethod_basic PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/core
)

# require c++17
target_compile_features(basicauthmethod PRIVATE cxx_std_17)
target_compile_features(authmethod_basic PRIVATE cxx_std_17)

target_link_libraries(basicauthmethod qgis_core)
target_link_libraries(authmethod_basic qgis_core)

if (WITH_GUI)
target_include_directories(basicauthmethod PUBLIC
target_include_directories(authmethod_basic PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/gui
${CMAKE_CURRENT_BINARY_DIR}
)
target_link_libraries(basicauthmethod qgis_gui)
target_link_libraries(authmethod_basic qgis_gui)
endif()

target_compile_definitions(basicauthmethod PRIVATE "-DQT_NO_FOREACH")
target_compile_definitions(authmethod_basic PRIVATE "-DQT_NO_FOREACH")

install(TARGETS basicauthmethod
install(TARGETS authmethod_basic
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}
)
@@ -20,28 +20,28 @@ if (WITH_GUI)
QT5_WRAP_UI(AUTH_ESRITOKEN_UIS_H ${AUTH_ESRITOKEN_UIS})
endif()

add_library(esritokenauthmethod MODULE ${AUTH_ESRITOKEN_SRCS} ${AUTH_ESRITOKEN_HDRS} ${AUTH_ESRITOKEN_UIS_H})
add_library(authmethod_esritoken MODULE ${AUTH_ESRITOKEN_SRCS} ${AUTH_ESRITOKEN_HDRS} ${AUTH_ESRITOKEN_UIS_H})

target_include_directories(esritokenauthmethod PUBLIC
target_include_directories(authmethod_esritoken PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/core
)

# require c++17
target_compile_features(esritokenauthmethod PRIVATE cxx_std_17)
target_compile_features(authmethod_esritoken PRIVATE cxx_std_17)

target_link_libraries(esritokenauthmethod qgis_core)
target_link_libraries(authmethod_esritoken qgis_core)

if (WITH_GUI)
target_include_directories(esritokenauthmethod PUBLIC
target_include_directories(authmethod_esritoken PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/gui
${CMAKE_CURRENT_BINARY_DIR}
)
target_link_libraries(esritokenauthmethod qgis_gui)
target_link_libraries(authmethod_esritoken qgis_gui)
endif()

target_compile_definitions(esritokenauthmethod PRIVATE "-DQT_NO_FOREACH")
target_compile_definitions(authmethod_esritoken PRIVATE "-DQT_NO_FOREACH")

install(TARGETS esritokenauthmethod
install(TARGETS authmethod_esritoken
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}
)
@@ -20,33 +20,33 @@ if (WITH_GUI)
QT5_WRAP_UI(AUTH_IDENTCERT_UIS_H ${AUTH_IDENTCERT_UIS})
endif()

add_library(identcertauthmethod MODULE ${AUTH_IDENTCERT_SRCS} ${AUTH_IDENTCERT_HDRS} ${AUTH_IDENTCERT_UIS_H})
add_library(authmethod_identcert MODULE ${AUTH_IDENTCERT_SRCS} ${AUTH_IDENTCERT_HDRS} ${AUTH_IDENTCERT_UIS_H})

target_include_directories(identcertauthmethod SYSTEM PUBLIC
target_include_directories(authmethod_identcert SYSTEM PUBLIC
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
)

target_include_directories(identcertauthmethod PUBLIC
target_include_directories(authmethod_identcert PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/core
)

# require c++17
target_compile_features(identcertauthmethod PRIVATE cxx_std_17)
target_compile_features(authmethod_identcert PRIVATE cxx_std_17)

target_link_libraries(identcertauthmethod qgis_core)
target_link_libraries(authmethod_identcert qgis_core)

if (WITH_GUI)
target_include_directories(identcertauthmethod PUBLIC
target_include_directories(authmethod_identcert PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/gui
${CMAKE_CURRENT_BINARY_DIR}
)
target_link_libraries(identcertauthmethod qgis_gui)
target_link_libraries(authmethod_identcert qgis_gui)
endif()

target_compile_definitions(identcertauthmethod PRIVATE "-DQT_NO_FOREACH")
target_compile_definitions(authmethod_identcert PRIVATE "-DQT_NO_FOREACH")

install(TARGETS identcertauthmethod
install(TARGETS authmethod_identcert
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}
)
@@ -101,7 +101,7 @@ set(_library_suffix_MODULE "")
set(_library_suffix_STATIC "_static")

foreach(_library_type MODULE STATIC)
set(_library_name "oauth2authmethod${_library_suffix_${_library_type}}")
set(_library_name "authmethod_oauth2${_library_suffix_${_library_type}}")

add_library(${_library_name} ${_library_type} ${AUTH_OAUTH2_SRCS} ${AUTH_OAUTH2_HDRS} ${AUTH_OAUTH2_UIS_H} ${AUTH_OAUTH2_RCCS})

@@ -20,33 +20,33 @@ if (WITH_GUI)
QT5_WRAP_UI(AUTH_PKIPATHS_UIS_H ${AUTH_PKIPATHS_UIS})
endif()

add_library(pkipathsauthmethod MODULE ${AUTH_PKIPATHS_SRCS} ${AUTH_PKIPATHS_HDRS} ${AUTH_PKIPATHS_UIS_H})
add_library(authmethod_pkipaths MODULE ${AUTH_PKIPATHS_SRCS} ${AUTH_PKIPATHS_HDRS} ${AUTH_PKIPATHS_UIS_H})

target_include_directories (pkipathsauthmethod SYSTEM PUBLIC
target_include_directories (authmethod_pkipaths SYSTEM PUBLIC
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
)

target_include_directories(pkipathsauthmethod PUBLIC
target_include_directories(authmethod_pkipaths PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/core
)

# require c++17
target_compile_features(pkipathsauthmethod PRIVATE cxx_std_17)
target_compile_features(authmethod_pkipaths PRIVATE cxx_std_17)

target_link_libraries(pkipathsauthmethod qgis_core)
target_link_libraries(authmethod_pkipaths qgis_core)

if (WITH_GUI)
target_include_directories(pkipathsauthmethod PUBLIC
target_include_directories(authmethod_pkipaths PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/gui
${CMAKE_CURRENT_BINARY_DIR}
)
target_link_libraries(pkipathsauthmethod qgis_gui)
target_link_libraries(authmethod_pkipaths qgis_gui)
endif()

target_compile_definitions(pkipathsauthmethod PRIVATE "-DQT_NO_FOREACH")
target_compile_definitions(authmethod_pkipaths PRIVATE "-DQT_NO_FOREACH")

install(TARGETS pkipathsauthmethod
install(TARGETS authmethod_pkipaths
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}
)
@@ -20,33 +20,33 @@ if (WITH_GUI)
QT5_WRAP_UI(AUTH_PKCS12_UIS_H ${AUTH_PKCS12_UIS})
endif()

add_library(pkcs12authmethod MODULE ${AUTH_PKCS12_SRCS} ${AUTH_PKCS12_HDRS} ${AUTH_PKCS12_UIS_H})
add_library(authmethod_pkcs12 MODULE ${AUTH_PKCS12_SRCS} ${AUTH_PKCS12_HDRS} ${AUTH_PKCS12_UIS_H})

target_include_directories(pkcs12authmethod SYSTEM PUBLIC
target_include_directories(authmethod_pkcs12 SYSTEM PUBLIC
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
)

target_include_directories(pkcs12authmethod PUBLIC
target_include_directories(authmethod_pkcs12 PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/core
)

# require c++17
target_compile_features(pkcs12authmethod PRIVATE cxx_std_17)
target_compile_features(authmethod_pkcs12 PRIVATE cxx_std_17)

target_link_libraries(pkcs12authmethod qgis_core)
target_link_libraries(authmethod_pkcs12 qgis_core)

if (WITH_GUI)
target_include_directories(pkcs12authmethod PUBLIC
target_include_directories(authmethod_pkcs12 PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/gui
${CMAKE_CURRENT_BINARY_DIR}
)
target_link_libraries(pkcs12authmethod qgis_gui)
target_link_libraries(authmethod_pkcs12 qgis_gui)
endif()

target_compile_definitions(pkcs12authmethod PRIVATE "-DQT_NO_FOREACH")
target_compile_definitions(authmethod_pkcs12 PRIVATE "-DQT_NO_FOREACH")

install(TARGETS pkcs12authmethod
install(TARGETS authmethod_pkcs12
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}
)
@@ -2021,8 +2021,8 @@ if (FORCE_STATIC_PROVIDERS)
)

target_link_libraries(qgis_core
wmsprovider_a
postgresprovider_a
provider_wms_a
provider_postgres_a
)
endif()

@@ -58,11 +58,10 @@ QgsAuthMethodRegistry::QgsAuthMethodRegistry( const QString &pluginPath )
mLibraryDirectory.setFilter( QDir::Files | QDir::NoSymLinks );

#if defined(Q_OS_WIN) || defined(__CYGWIN__)
mLibraryDirectory.setNameFilters( QStringList( "*authmethod.dll" ) );
mLibraryDirectory.setNameFilters( QStringList( "authmethod_*.dll" ) );
#else
mLibraryDirectory.setNameFilters( QStringList( QStringLiteral( "*authmethod*.so" ) ) );
mLibraryDirectory.setNameFilters( QStringList( QStringLiteral( "*authmethod_*.so" ) ) );
#endif

QgsDebugMsgLevel( QStringLiteral( "Checking for auth method plugins in: %1" ).arg( mLibraryDirectory.path() ), 2 );

if ( mLibraryDirectory.count() == 0 )
@@ -202,7 +202,7 @@ void QgsProviderRegistry::init()
#if defined(Q_OS_WIN) || defined(__CYGWIN__)
mLibraryDirectory.setNameFilters( QStringList( "*.dll" ) );
#elif defined(ANDROID)
mLibraryDirectory.setNameFilters( QStringList( "*provider*.so" ) );
mLibraryDirectory.setNameFilters( QStringList( "*provider_*.so" ) );
#else
mLibraryDirectory.setNameFilters( QStringList( QStringLiteral( "*.so" ) ) );
#endif
@@ -1497,8 +1497,8 @@ target_link_libraries(qgis_gui

if (FORCE_STATIC_PROVIDERS)
target_link_libraries(qgis_gui
wmsprovider_gui_a
postgresprovider_gui_a
provider_wms_gui_a
provider_postgres_gui_a
)
endif()

Loading

0 comments on commit ad618e7

Please sign in to comment.