Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove need for GUI to build authentication methods (#43262)
* Remove need for GUI to build authentication methods * Nyall and Denis know better, add the flag :) * Fix header .cpp file name * Remove needless include_directories * separate gui/core parts of auth method libraries * core part to add gui modules for auth methods * move oauth resources to top level * refactor methods to support both modules * move qjsonwrapper to external * some fixes * revert separation of modules gui/core, just a better code separation Co-authored-by: Denis Rouzaud <denis.rouzaud@gmail.com>
- Loading branch information
Showing
69 changed files
with
447 additions
and
331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,47 @@ | ||
set(AUTH_BASIC_SRCS | ||
qgsauthbasicmethod.cpp | ||
qgsauthbasicedit.cpp | ||
core/qgsauthbasicmethod.cpp | ||
) | ||
|
||
set(AUTH_BASIC_HDRS | ||
qgsauthbasicedit.h | ||
qgsauthbasicmethod.h | ||
core/qgsauthbasicmethod.h | ||
) | ||
|
||
set(AUTH_BASIC_UIS qgsauthbasicedit.ui) | ||
set(AUTH_BASIC_UIS_H "") | ||
|
||
include_directories ( | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
if (WITH_GUI) | ||
set(AUTH_BASIC_SRCS ${AUTH_BASIC_SRCS} | ||
gui/qgsauthbasicmethodgui.cpp | ||
gui/qgsauthbasicedit.cpp | ||
) | ||
set(AUTH_BASIC_HDRS ${AUTH_BASIC_HDRS} | ||
gui/qgsauthbasicedit.h | ||
) | ||
set(AUTH_BASIC_UIS gui/qgsauthbasicedit.ui) | ||
QT5_WRAP_UI(AUTH_BASIC_UIS_H ${AUTH_BASIC_UIS}) | ||
endif() | ||
|
||
QT5_WRAP_UI (AUTH_BASIC_UIS_H ${AUTH_BASIC_UIS}) | ||
add_library(basicauthmethod MODULE ${AUTH_BASIC_SRCS} ${AUTH_BASIC_HDRS} ${AUTH_BASIC_UIS_H}) | ||
|
||
add_library (basicauthmethod MODULE ${AUTH_BASIC_SRCS} ${AUTH_BASIC_HDRS} ${AUTH_BASIC_UIS_H}) | ||
target_include_directories(basicauthmethod PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/core | ||
) | ||
|
||
# require c++17 | ||
target_compile_features(basicauthmethod PRIVATE cxx_std_17) | ||
|
||
target_link_libraries (basicauthmethod | ||
qgis_core | ||
qgis_gui | ||
) | ||
target_link_libraries(basicauthmethod qgis_core) | ||
|
||
if (WITH_GUI) | ||
target_include_directories(basicauthmethod PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/gui | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
target_link_libraries(basicauthmethod qgis_gui) | ||
endif() | ||
|
||
target_compile_definitions(basicauthmethod PRIVATE "-DQT_NO_FOREACH") | ||
|
||
install(TARGETS basicauthmethod | ||
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR} | ||
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}) | ||
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/*************************************************************************** | ||
qgsauthbasicmethodgui.cpp | ||
--------------------- | ||
begin : September 1, 2015 | ||
copyright : (C) 2015 by Boundless Spatial, Inc. USA | ||
author : Larry Shaffer | ||
email : lshaffer at boundlessgeo dot com | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgsauthbasicedit.h" | ||
|
||
/** | ||
* Optional class factory to return a pointer to a newly created edit widget | ||
*/ | ||
QGISEXTERN QgsAuthBasicEdit *editWidget( QWidget *parent ) | ||
{ | ||
return new QgsAuthBasicEdit( parent ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,47 @@ | ||
set(AUTH_ESRI_TOKEN_SRCS | ||
qgsauthesritokenmethod.cpp | ||
qgsauthesritokenedit.cpp | ||
set(AUTH_ESRITOKEN_SRCS | ||
core/qgsauthesritokenmethod.cpp | ||
) | ||
|
||
set(AUTH_ESRI_TOKEN_HDRS | ||
qgsauthesritokenedit.h | ||
qgsauthesritokenmethod.h | ||
set(AUTH_ESRITOKEN_HDRS | ||
core/qgsauthesritokenmethod.h | ||
) | ||
|
||
set(AUTH_ESRI_TOKEN_UIS qgsauthesritokenedit.ui) | ||
set(AUTH_ESRITOKEN_UIS_H "") | ||
|
||
include_directories ( | ||
../../core | ||
../../core/auth | ||
../../core/geometry | ||
../../core/metadata | ||
) | ||
include_directories ( | ||
../../gui | ||
../../gui/auth | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
if (WITH_GUI) | ||
set(AUTH_ESRITOKEN_SRCS ${AUTH_ESRITOKEN_SRCS} | ||
gui/qgsauthesritokenmethodgui.cpp | ||
gui/qgsauthesritokenedit.cpp | ||
) | ||
set(AUTH_ESRITOKEN_HDRS ${AUTH_ESRITOKEN_HDRS} | ||
gui/qgsauthesritokenedit.h | ||
) | ||
set(AUTH_ESRITOKEN_UIS gui/qgsauthesritokenedit.ui) | ||
QT5_WRAP_UI(AUTH_ESRITOKEN_UIS_H ${AUTH_ESRITOKEN_UIS}) | ||
endif() | ||
|
||
QT5_WRAP_UI (AUTH_ESRI_TOKEN_UIS_H ${AUTH_ESRI_TOKEN_UIS}) | ||
add_library(esritokenauthmethod MODULE ${AUTH_ESRITOKEN_SRCS} ${AUTH_ESRITOKEN_HDRS} ${AUTH_ESRITOKEN_UIS_H}) | ||
|
||
add_library (esritokenauthmethod MODULE ${AUTH_ESRI_TOKEN_SRCS} ${AUTH_ESRI_TOKEN_HDRS} ${AUTH_ESRI_TOKEN_UIS_H}) | ||
target_include_directories(esritokenauthmethod PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/core | ||
) | ||
|
||
# require c++17 | ||
target_compile_features(esritokenauthmethod PRIVATE cxx_std_17) | ||
|
||
target_link_libraries (esritokenauthmethod | ||
qgis_core | ||
qgis_gui | ||
) | ||
target_link_libraries(esritokenauthmethod qgis_core) | ||
|
||
if (WITH_GUI) | ||
target_include_directories(esritokenauthmethod PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/gui | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
target_link_libraries(esritokenauthmethod qgis_gui) | ||
endif() | ||
|
||
target_compile_definitions(esritokenauthmethod PRIVATE "-DQT_NO_FOREACH") | ||
|
||
install(TARGETS esritokenauthmethod | ||
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR} | ||
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}) | ||
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*************************************************************************** | ||
qgsauthesritokenmethodgui.cpp | ||
-------------------------- | ||
begin : October 2018 | ||
copyright : (C) 2018 by Nyall Dawson | ||
author : Nyall Dawson | ||
email : nyall dot dawson at gmail dot com | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgsauthesritokenedit.h" | ||
|
||
|
||
/** | ||
* Optional class factory to return a pointer to a newly created edit widget | ||
*/ | ||
QGISEXTERN QgsAuthEsriTokenEdit *editWidget( QWidget *parent ) | ||
{ | ||
return new QgsAuthEsriTokenEdit( parent ); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,52 @@ | ||
set(AUTH_IDENTCERT_SRCS | ||
qgsauthidentcertmethod.cpp | ||
qgsauthidentcertedit.cpp | ||
core/qgsauthidentcertmethod.cpp | ||
) | ||
|
||
set(AUTH_IDENTCERT_HDRS | ||
qgsauthidentcertedit.h | ||
qgsauthidentcertmethod.h | ||
core/qgsauthidentcertmethod.h | ||
) | ||
|
||
set(AUTH_IDENTCERT_UIS qgsauthidentcertedit.ui) | ||
set(AUTH_IDENTCERT_UIS_H "") | ||
|
||
include_directories ( | ||
../../core | ||
../../core/auth | ||
../../core/geometry | ||
../../core/metadata | ||
) | ||
include_directories (SYSTEM | ||
if (WITH_GUI) | ||
set(AUTH_IDENTCERT_SRCS ${AUTH_IDENTCERT_SRCS} | ||
gui/qgsauthidentcertmethodgui.cpp | ||
gui/qgsauthidentcertedit.cpp | ||
) | ||
set(AUTH_IDENTCERT_HDRS ${AUTH_IDENTCERT_HDRS} | ||
gui/qgsauthidentcertedit.h | ||
) | ||
set(AUTH_IDENTCERT_UIS gui/qgsauthidentcertedit.ui) | ||
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}) | ||
|
||
target_include_directories(identcertauthmethod SYSTEM PUBLIC | ||
${QCA_INCLUDE_DIR} | ||
${QTKEYCHAIN_INCLUDE_DIR} | ||
) | ||
include_directories ( | ||
../../gui | ||
../../gui/auth | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
|
||
QT5_WRAP_UI (AUTH_IDENTCERT_UIS_H ${AUTH_IDENTCERT_UIS}) | ||
|
||
add_library (identcertauthmethod MODULE ${AUTH_IDENTCERT_SRCS} ${AUTH_IDENTCERT_HDRS} ${AUTH_IDENTCERT_UIS_H}) | ||
target_include_directories(identcertauthmethod PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/core | ||
) | ||
|
||
# require c++17 | ||
target_compile_features(identcertauthmethod PRIVATE cxx_std_17) | ||
|
||
target_link_libraries (identcertauthmethod | ||
qgis_core | ||
qgis_gui | ||
) | ||
target_link_libraries(identcertauthmethod qgis_core) | ||
|
||
if (WITH_GUI) | ||
target_include_directories(identcertauthmethod PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/gui | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
target_link_libraries(identcertauthmethod qgis_gui) | ||
endif() | ||
|
||
target_compile_definitions(identcertauthmethod PRIVATE "-DQT_NO_FOREACH") | ||
|
||
install(TARGETS identcertauthmethod | ||
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR} | ||
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}) | ||
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.