From b88b26a5ce0e01b5901a245f1d35ea48cc0c9a86 Mon Sep 17 00:00:00 2001 From: "Marcus D. Hanwell" Date: Sat, 29 Apr 2023 13:39:07 -0400 Subject: [PATCH] Remove and tweak include_directories in plugins Also spotted a few variables still being used for linking along with many calls to add the current binary directory to the include path. Signed-off-by: Marcus D. Hanwell --- avogadro/qtplugins/3dmol/CMakeLists.txt | 2 -- avogadro/qtplugins/applycolors/CMakeLists.txt | 3 +-- avogadro/qtplugins/bonding/CMakeLists.txt | 2 -- avogadro/qtplugins/centroid/CMakeLists.txt | 2 -- avogadro/qtplugins/coloropacitymap/CMakeLists.txt | 2 -- avogadro/qtplugins/coordinateeditor/CMakeLists.txt | 3 --- avogadro/qtplugins/copypaste/CMakeLists.txt | 2 -- avogadro/qtplugins/fetchpdb/CMakeLists.txt | 2 +- avogadro/qtplugins/focus/CMakeLists.txt | 2 -- avogadro/qtplugins/hydrogens/CMakeLists.txt | 2 -- avogadro/qtplugins/importpqr/CMakeLists.txt | 2 +- avogadro/qtplugins/insertdna/CMakeLists.txt | 2 +- avogadro/qtplugins/insertfragment/CMakeLists.txt | 2 -- avogadro/qtplugins/lineformatinput/CMakeLists.txt | 2 -- avogadro/qtplugins/molecularproperties/CMakeLists.txt | 2 -- avogadro/qtplugins/plugindownloader/CMakeLists.txt | 2 +- avogadro/qtplugins/ply/CMakeLists.txt | 2 -- avogadro/qtplugins/povray/CMakeLists.txt | 2 -- avogadro/qtplugins/propertytables/CMakeLists.txt | 2 -- avogadro/qtplugins/resetview/CMakeLists.txt | 2 -- avogadro/qtplugins/select/CMakeLists.txt | 2 -- avogadro/qtplugins/svg/CMakeLists.txt | 1 - avogadro/qtplugins/vrml/CMakeLists.txt | 2 -- 23 files changed, 5 insertions(+), 42 deletions(-) diff --git a/avogadro/qtplugins/3dmol/CMakeLists.txt b/avogadro/qtplugins/3dmol/CMakeLists.txt index 3e27cf3634..1d84e740f5 100644 --- a/avogadro/qtplugins/3dmol/CMakeLists.txt +++ b/avogadro/qtplugins/3dmol/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(ThreeDMol "The 3DMol HTML Block Generator" ExtensionPlugin diff --git a/avogadro/qtplugins/applycolors/CMakeLists.txt b/avogadro/qtplugins/applycolors/CMakeLists.txt index 0f12d8d1ce..20b637661a 100644 --- a/avogadro/qtplugins/applycolors/CMakeLists.txt +++ b/avogadro/qtplugins/applycolors/CMakeLists.txt @@ -1,5 +1,4 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR} -"${AvogadroLibs_SOURCE_DIR}/thirdparty/tinycolormap/include") +include_directories("${AvogadroLibs_SOURCE_DIR}/thirdparty/tinycolormap/include") avogadro_plugin(ApplyColors "Extension to apply color schemes to atoms and residues." diff --git a/avogadro/qtplugins/bonding/CMakeLists.txt b/avogadro/qtplugins/bonding/CMakeLists.txt index fcc067eb50..1c95bfbb0b 100644 --- a/avogadro/qtplugins/bonding/CMakeLists.txt +++ b/avogadro/qtplugins/bonding/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(Bonding "Perform bonding operations." ExtensionPlugin diff --git a/avogadro/qtplugins/centroid/CMakeLists.txt b/avogadro/qtplugins/centroid/CMakeLists.txt index 35cee7aa0a..5c9ed8ae2b 100644 --- a/avogadro/qtplugins/centroid/CMakeLists.txt +++ b/avogadro/qtplugins/centroid/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(Centroid "Add centroid and center-of-mass." ExtensionPlugin diff --git a/avogadro/qtplugins/coloropacitymap/CMakeLists.txt b/avogadro/qtplugins/coloropacitymap/CMakeLists.txt index d2f3552eaf..1e10a179ce 100644 --- a/avogadro/qtplugins/coloropacitymap/CMakeLists.txt +++ b/avogadro/qtplugins/coloropacitymap/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories("${CMAKE_CURRENT_SOURCE_DIR}") - set(_srcs coloropacitymap.cpp histogramwidget.cpp diff --git a/avogadro/qtplugins/coordinateeditor/CMakeLists.txt b/avogadro/qtplugins/coordinateeditor/CMakeLists.txt index 12d87dd794..14e8487316 100644 --- a/avogadro/qtplugins/coordinateeditor/CMakeLists.txt +++ b/avogadro/qtplugins/coordinateeditor/CMakeLists.txt @@ -1,6 +1,3 @@ -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(CoordinateEditor "Show a window with a free-text coordinate editor." ExtensionPlugin diff --git a/avogadro/qtplugins/copypaste/CMakeLists.txt b/avogadro/qtplugins/copypaste/CMakeLists.txt index 3065aa7871..2ef8eac049 100644 --- a/avogadro/qtplugins/copypaste/CMakeLists.txt +++ b/avogadro/qtplugins/copypaste/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(CopyPaste "Interact with the clipboard." ExtensionPlugin diff --git a/avogadro/qtplugins/fetchpdb/CMakeLists.txt b/avogadro/qtplugins/fetchpdb/CMakeLists.txt index 16962d3a6d..512e310b74 100644 --- a/avogadro/qtplugins/fetchpdb/CMakeLists.txt +++ b/avogadro/qtplugins/fetchpdb/CMakeLists.txt @@ -12,4 +12,4 @@ avogadro_plugin(FetchPDB ) target_link_libraries(FetchPDB - PRIVATE Avogadro::IO ${Qt5Network_LIBRARIES}) + PRIVATE Avogadro::IO Qt::Network) diff --git a/avogadro/qtplugins/focus/CMakeLists.txt b/avogadro/qtplugins/focus/CMakeLists.txt index 2e20bc4dc8..7790544f3b 100644 --- a/avogadro/qtplugins/focus/CMakeLists.txt +++ b/avogadro/qtplugins/focus/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(Focus "Focus the view on specific features." ExtensionPlugin diff --git a/avogadro/qtplugins/hydrogens/CMakeLists.txt b/avogadro/qtplugins/hydrogens/CMakeLists.txt index 45bb999bd0..3bbbf7e4f5 100644 --- a/avogadro/qtplugins/hydrogens/CMakeLists.txt +++ b/avogadro/qtplugins/hydrogens/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(Hydrogens "Extension that adds/removes hydrogens on a molecule." ExtensionPlugin diff --git a/avogadro/qtplugins/importpqr/CMakeLists.txt b/avogadro/qtplugins/importpqr/CMakeLists.txt index 653a00bf44..cf4c091ca4 100644 --- a/avogadro/qtplugins/importpqr/CMakeLists.txt +++ b/avogadro/qtplugins/importpqr/CMakeLists.txt @@ -17,4 +17,4 @@ avogadro_plugin(ImportPQR "" ) -target_link_libraries(ImportPQR PRIVATE ${Qt5Network_LIBRARIES}) +target_link_libraries(ImportPQR PRIVATE Qt::Network) diff --git a/avogadro/qtplugins/insertdna/CMakeLists.txt b/avogadro/qtplugins/insertdna/CMakeLists.txt index 69d00b92a0..d02702f024 100644 --- a/avogadro/qtplugins/insertdna/CMakeLists.txt +++ b/avogadro/qtplugins/insertdna/CMakeLists.txt @@ -1,4 +1,4 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR} "${AvogadroLibs_SOURCE_DIR}/thirdparty") +include_directories("${AvogadroLibs_SOURCE_DIR}/thirdparty") avogadro_plugin(NucleicInput "Insert DNA/RNA sequences." diff --git a/avogadro/qtplugins/insertfragment/CMakeLists.txt b/avogadro/qtplugins/insertfragment/CMakeLists.txt index e87943afbe..c67f35a406 100644 --- a/avogadro/qtplugins/insertfragment/CMakeLists.txt +++ b/avogadro/qtplugins/insertfragment/CMakeLists.txt @@ -1,7 +1,5 @@ include(ExternalProject) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(InsertFragment "Insert molecular fragments and crystals." ExtensionPlugin diff --git a/avogadro/qtplugins/lineformatinput/CMakeLists.txt b/avogadro/qtplugins/lineformatinput/CMakeLists.txt index a5e424b66d..56af4457f5 100644 --- a/avogadro/qtplugins/lineformatinput/CMakeLists.txt +++ b/avogadro/qtplugins/lineformatinput/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(LineFormatInput "Enter line formats in a dialog window." ExtensionPlugin diff --git a/avogadro/qtplugins/molecularproperties/CMakeLists.txt b/avogadro/qtplugins/molecularproperties/CMakeLists.txt index 816e29668b..e268330004 100644 --- a/avogadro/qtplugins/molecularproperties/CMakeLists.txt +++ b/avogadro/qtplugins/molecularproperties/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(MolecularProperties "Show a window with basic molecular properties." ExtensionPlugin diff --git a/avogadro/qtplugins/plugindownloader/CMakeLists.txt b/avogadro/qtplugins/plugindownloader/CMakeLists.txt index 873417d0bd..dd8e5657fc 100644 --- a/avogadro/qtplugins/plugindownloader/CMakeLists.txt +++ b/avogadro/qtplugins/plugindownloader/CMakeLists.txt @@ -19,5 +19,5 @@ avogadro_plugin(PluginDownloader "" ) -target_link_libraries(PluginDownloader PRIVATE ${Qt5Network_LIBRARIES} +target_link_libraries(PluginDownloader PRIVATE Qt::Network ${LIBARCHIVE_LIBRARIES}) diff --git a/avogadro/qtplugins/ply/CMakeLists.txt b/avogadro/qtplugins/ply/CMakeLists.txt index 689859a525..a6b2710860 100644 --- a/avogadro/qtplugins/ply/CMakeLists.txt +++ b/avogadro/qtplugins/ply/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(PLY "Render the scene using PLY." ExtensionPlugin diff --git a/avogadro/qtplugins/povray/CMakeLists.txt b/avogadro/qtplugins/povray/CMakeLists.txt index a61b422af2..d772fedf70 100644 --- a/avogadro/qtplugins/povray/CMakeLists.txt +++ b/avogadro/qtplugins/povray/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(POVRay "Render the scene using POV-Ray." ExtensionPlugin diff --git a/avogadro/qtplugins/propertytables/CMakeLists.txt b/avogadro/qtplugins/propertytables/CMakeLists.txt index ea22d40b0a..18170b789a 100644 --- a/avogadro/qtplugins/propertytables/CMakeLists.txt +++ b/avogadro/qtplugins/propertytables/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(PropertyTables "Atom, Bond, Angle, Dihedral property tables." ExtensionPlugin diff --git a/avogadro/qtplugins/resetview/CMakeLists.txt b/avogadro/qtplugins/resetview/CMakeLists.txt index 57bef1e290..9da8631992 100644 --- a/avogadro/qtplugins/resetview/CMakeLists.txt +++ b/avogadro/qtplugins/resetview/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(ResetView "Manipulate the view camera." ExtensionPlugin diff --git a/avogadro/qtplugins/select/CMakeLists.txt b/avogadro/qtplugins/select/CMakeLists.txt index bea46dda23..8f89d7f488 100644 --- a/avogadro/qtplugins/select/CMakeLists.txt +++ b/avogadro/qtplugins/select/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(Select "Extension that modifies selections." ExtensionPlugin diff --git a/avogadro/qtplugins/svg/CMakeLists.txt b/avogadro/qtplugins/svg/CMakeLists.txt index 2bad2e226e..d3f8c668a3 100644 --- a/avogadro/qtplugins/svg/CMakeLists.txt +++ b/avogadro/qtplugins/svg/CMakeLists.txt @@ -1,4 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) find_package(Qt${QT_VERSION} COMPONENTS Svg REQUIRED) avogadro_plugin(SVG diff --git a/avogadro/qtplugins/vrml/CMakeLists.txt b/avogadro/qtplugins/vrml/CMakeLists.txt index 02b2203195..9757c65591 100644 --- a/avogadro/qtplugins/vrml/CMakeLists.txt +++ b/avogadro/qtplugins/vrml/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - avogadro_plugin(VRML "Render the scene using VRML." ExtensionPlugin