From 552fe42d7768caeacd68d5140a30d2b70f5f5596 Mon Sep 17 00:00:00 2001 From: mike-dixon Date: Mon, 11 Nov 2024 16:41:07 -0700 Subject: [PATCH] build/cmake/createCMakeLists.py - for MAMBA_BUILD do not search for packages --- build/cmake/createCMakeLists.py | 89 +++++++++---------- codebase/CMakeLists.txt | 38 ++++---- .../apps/radar/src/HawkEdit/CMakeLists.txt | 49 +++++----- .../apps/radar/src/HawkEye/CMakeLists.txt | 49 +++++----- codebase/apps/radar/src/IpsEye/CMakeLists.txt | 49 +++++----- codebase/apps/radar/src/Sprite/CMakeLists.txt | 49 +++++----- codebase/libs/qtplot/src/CMakeLists.txt | 49 +++++----- 7 files changed, 183 insertions(+), 189 deletions(-) diff --git a/build/cmake/createCMakeLists.py b/build/cmake/createCMakeLists.py index cb2f5dcb5..ab49add78 100755 --- a/build/cmake/createCMakeLists.py +++ b/build/cmake/createCMakeLists.py @@ -607,11 +607,11 @@ def writeCMakeListsCodebase(dir): fo.write('if (DEFINED MAMBA_BUILD)\n') fo.write('# MAMBA builds ignore system includes and libs, use mamba dirs\n') - fo.write(' set(MAMBA_INCLUDE_PATH ${MINIFORGE_ROOT}/include)\n') - fo.write(' set(MAMBA_LIBRARY_PATH ${MINIFORGE_ROOT}/lib)\n') - fo.write(' set(QT_HOST_PATH ${MINIFORGE_ROOT})\n') - fo.write(' set(CMAKE_FIND_USE_CMAKE_SYSTEM_PATH FALSE)\n') - fo.write(' set(CMAKE_SYSTEM_IGNORE_PREFIX_PATH "/usr;/usr/local;/usr/lib64;/lib;/lib64;/opt/homebrew")\n') + fo.write('set(MAMBA_INCLUDE_PATH ${MINIFORGE_ROOT}/include)\n') + fo.write('set(MAMBA_LIBRARY_PATH ${MINIFORGE_ROOT}/lib)\n') + fo.write('set(QT_HOST_PATH ${MINIFORGE_ROOT})\n') + fo.write('set(CMAKE_FIND_USE_CMAKE_SYSTEM_PATH FALSE)\n') + fo.write('set(CMAKE_SYSTEM_IGNORE_PREFIX_PATH "/usr;/usr/local;/usr/lib64;/lib;/lib64;/opt/homebrew")\n') fo.write("endif(DEFINED MAMBA_BUILD)\n") fo.write('\n') @@ -623,6 +623,8 @@ def writeCMakeListsCodebase(dir): fo.write('\n') if (globalNeedQt): + fo.write('if (NOT DEFINED MAMBA_BUILD)\n') + fo.write('# MAMBA builds ignore system libs, use mamba libs\n') fo.write('# Finding Qt\n') fo.write('\n') fo.write('find_package (Qt6 COMPONENTS Core QUIET)\n') @@ -639,23 +641,21 @@ def writeCMakeListsCodebase(dir): fo.write('\n') fo.write('if(APPLE)\n') - fo.write(' if (DEFINED MAMBA_BUILD)\n') - fo.write('# MAMBA builds ignore system libs, use mamba libs\n') - fo.write(' if (Qt5_FOUND)\n') - fo.write(' find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH)\n') - fo.write(' elseif (Qt6_FOUND)\n') - fo.write(' find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH)\n') - fo.write(' endif(Qt5_FOUND)\n') - fo.write(' else ()\n') - fo.write(' if (Qt5_FOUND)\n') - fo.write(' find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH)\n') - fo.write(' elseif (Qt6_FOUND)\n') - fo.write(' find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH)\n') - fo.write(' endif(Qt5_FOUND)\n') - fo.write(' endif(DEFINED MAMBA_BUILD)\n') + fo.write(' if (Qt5_FOUND)\n') + fo.write(' find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH)\n') + fo.write(' elseif (Qt6_FOUND)\n') + fo.write(' find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH)\n') + fo.write(' endif(Qt5_FOUND)\n') + fo.write('else ()\n') + fo.write(' if (Qt5_FOUND)\n') + fo.write(' find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH)\n') + fo.write(' elseif (Qt6_FOUND)\n') + fo.write(' find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH)\n') + fo.write(' endif(Qt5_FOUND)\n') fo.write('endif(APPLE)\n') + fo.write('endif(NOT DEFINED MAMBA_BUILD)\n') fo.write('\n') - + fo.write('find_package (HDF5)\n') fo.write('\n') @@ -1601,6 +1601,7 @@ def writeCMakeListsApp(appName, appDir, appCompileFileList, def addFindQt(fo): + fo.write('if (NOT DEFINED MAMBA_BUILD)\n') fo.write('#Finding Qt\n') fo.write('find_package (Qt6 COMPONENTS Core QUIET)\n') fo.write('if (NOT Qt6_FOUND)\n') @@ -1615,34 +1616,31 @@ def addFindQt(fo): fo.write('endif(Qt5_FOUND)\n') fo.write('if(APPLE)\n') - fo.write(' if (DEFINED MAMBA_BUILD)\n') - fo.write('# MAMBA builds ignore system libs, use mamba libs\n') - fo.write(' if (Qt5_FOUND)\n') - fo.write(' find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH)\n') - fo.write(' elseif (Qt6_FOUND)\n') - fo.write(' find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH)\n') - fo.write(' endif(Qt5_FOUND)\n') - fo.write(' else()\n') - fo.write(' if (Qt5_FOUND)\n') - fo.write(' find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH)\n') - fo.write(' elseif (Qt6_FOUND)\n') - fo.write(' find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH)\n') - fo.write(' endif(Qt5_FOUND)\n') - fo.write(' endif(DEFINED MAMBA_BUILD)\n') + fo.write(' if (Qt5_FOUND)\n') + fo.write(' find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH)\n') + fo.write(' elseif (Qt6_FOUND)\n') + fo.write(' find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH)\n') + fo.write(' endif(Qt5_FOUND)\n') + fo.write('else()\n') + fo.write(' if (Qt5_FOUND)\n') + fo.write(' find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH)\n') + fo.write(' elseif (Qt6_FOUND)\n') + fo.write(' find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH)\n') + fo.write(' endif(Qt5_FOUND)\n') fo.write('endif(APPLE)\n') + fo.write('endif(NOT DEFINED MAMBA_BUILD)\n') fo.write("set (CMAKE_INCLUDE_CURRENT_DIR ON)\n") fo.write("set (CMAKE_AUTOMOC ON)\n") fo.write("set (CMAKE_AUTORCC ON)\n") fo.write("set (CMAKE_AUTOUIC ON)\n") + fo.write('if (NOT DEFINED MAMBA_BUILD)\n') fo.write('if (Qt5_FOUND)\n') - fo.write("#QT5\n") - fo.write(' if (DEFINED MAMBA_BUILD)\n') - fo.write(" find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH)\n") - fo.write(' else()\n') - fo.write(" find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH)\n") - fo.write(' endif(DEFINED MAMBA_BUILD)\n') + fo.write("# QT5\n") + fo.write("# find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH)\n") + fo.write('#else()\n') + fo.write(" find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH)\n") fo.write(" pkg_search_module(Qt5Core REQUIRED)\n") fo.write(" pkg_search_module(Qt5Gui REQUIRED)\n") fo.write(" pkg_search_module(Qt5Widgets REQUIRED)\n") @@ -1650,17 +1648,18 @@ def addFindQt(fo): fo.write(" pkg_search_module(Qt5Qml REQUIRED)\n") fo.write('else()\n') fo.write("#QT6\n") - fo.write(' if (DEFINED MAMBA_BUILD)\n') - fo.write(" find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH)\n") - fo.write(' else()\n') - fo.write(" find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH)\n") - fo.write(' endif(DEFINED MAMBA_BUILD)\n') + fo.write('# if (DEFINED MAMBA_BUILD)\n') + fo.write("# find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH)\n") + fo.write('# else()\n') + fo.write(" find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH)\n") + fo.write('# endif(DEFINED MAMBA_BUILD)\n') fo.write(" pkg_search_module(Qt6Core REQUIRED)\n") fo.write(" pkg_search_module(Qt6Gui REQUIRED)\n") fo.write(" pkg_search_module(Qt6Widgets REQUIRED)\n") fo.write(" pkg_search_module(Qt6Network REQUIRED)\n") fo.write(" pkg_search_module(Qt6Qml REQUIRED)\n") fo.write('endif(Qt5_FOUND)\n') + fo.write('endif(NOT DEFINED MAMBA_BUILD)\n') fo.write("\n") ######################################################################## diff --git a/codebase/CMakeLists.txt b/codebase/CMakeLists.txt index bcc3fe08f..70f3bf7d9 100644 --- a/codebase/CMakeLists.txt +++ b/codebase/CMakeLists.txt @@ -48,11 +48,11 @@ endif() if (DEFINED MAMBA_BUILD) # MAMBA builds ignore system includes and libs, use mamba dirs - set(MAMBA_INCLUDE_PATH ${MINIFORGE_ROOT}/include) - set(MAMBA_LIBRARY_PATH ${MINIFORGE_ROOT}/lib) - set(QT_HOST_PATH ${MINIFORGE_ROOT}) - set(CMAKE_FIND_USE_CMAKE_SYSTEM_PATH FALSE) - set(CMAKE_SYSTEM_IGNORE_PREFIX_PATH "/usr;/usr/local;/usr/lib64;/lib;/lib64;/opt/homebrew") +set(MAMBA_INCLUDE_PATH ${MINIFORGE_ROOT}/include) +set(MAMBA_LIBRARY_PATH ${MINIFORGE_ROOT}/lib) +set(QT_HOST_PATH ${MINIFORGE_ROOT}) +set(CMAKE_FIND_USE_CMAKE_SYSTEM_PATH FALSE) +set(CMAKE_SYSTEM_IGNORE_PREFIX_PATH "/usr;/usr/local;/usr/lib64;/lib;/lib64;/opt/homebrew") endif(DEFINED MAMBA_BUILD) find_package (X11) @@ -60,6 +60,8 @@ if (DEFINED X11_X11_LIB) get_filename_component(X11_LIB_DIR ${X11_X11_LIB} DIRECTORY) endif() +if (NOT DEFINED MAMBA_BUILD) +# MAMBA builds ignore system libs, use mamba libs # Finding Qt find_package (Qt6 COMPONENTS Core QUIET) @@ -75,21 +77,19 @@ else () endif(Qt5_FOUND) if(APPLE) - if (DEFINED MAMBA_BUILD) -# MAMBA builds ignore system libs, use mamba libs - if (Qt5_FOUND) - find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - elseif (Qt6_FOUND) - find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - endif(Qt5_FOUND) - else () - if (Qt5_FOUND) - find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH) - elseif (Qt6_FOUND) - find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH) - endif(Qt5_FOUND) - endif(DEFINED MAMBA_BUILD) + if (Qt5_FOUND) + find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) + elseif (Qt6_FOUND) + find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) + endif(Qt5_FOUND) +else () + if (Qt5_FOUND) + find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH) + elseif (Qt6_FOUND) + find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH) + endif(Qt5_FOUND) endif(APPLE) +endif(NOT DEFINED MAMBA_BUILD) find_package (HDF5) diff --git a/codebase/apps/radar/src/HawkEdit/CMakeLists.txt b/codebase/apps/radar/src/HawkEdit/CMakeLists.txt index 950cd08b0..90ed582a8 100644 --- a/codebase/apps/radar/src/HawkEdit/CMakeLists.txt +++ b/codebase/apps/radar/src/HawkEdit/CMakeLists.txt @@ -86,6 +86,7 @@ set (SRCS FunctionEditor.cc ) +if (NOT DEFINED MAMBA_BUILD) #Finding Qt find_package (Qt6 COMPONENTS Core QUIET) if (NOT Qt6_FOUND) @@ -99,32 +100,29 @@ else () message(FATAL_ERROR, "Qt not found.") endif(Qt5_FOUND) if(APPLE) - if (DEFINED MAMBA_BUILD) -# MAMBA builds ignore system libs, use mamba libs - if (Qt5_FOUND) - find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - elseif (Qt6_FOUND) - find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - endif(Qt5_FOUND) - else() - if (Qt5_FOUND) - find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH) - elseif (Qt6_FOUND) - find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH) - endif(Qt5_FOUND) - endif(DEFINED MAMBA_BUILD) + if (Qt5_FOUND) + find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) + elseif (Qt6_FOUND) + find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) + endif(Qt5_FOUND) +else() + if (Qt5_FOUND) + find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH) + elseif (Qt6_FOUND) + find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH) + endif(Qt5_FOUND) endif(APPLE) +endif(NOT DEFINED MAMBA_BUILD) set (CMAKE_INCLUDE_CURRENT_DIR ON) set (CMAKE_AUTOMOC ON) set (CMAKE_AUTORCC ON) set (CMAKE_AUTOUIC ON) +if (NOT DEFINED MAMBA_BUILD) if (Qt5_FOUND) -#QT5 - if (DEFINED MAMBA_BUILD) - find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - else() - find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) - endif(DEFINED MAMBA_BUILD) +# QT5 +# find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) +#else() + find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) pkg_search_module(Qt5Core REQUIRED) pkg_search_module(Qt5Gui REQUIRED) pkg_search_module(Qt5Widgets REQUIRED) @@ -132,17 +130,18 @@ if (Qt5_FOUND) pkg_search_module(Qt5Qml REQUIRED) else() #QT6 - if (DEFINED MAMBA_BUILD) - find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - else() - find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) - endif(DEFINED MAMBA_BUILD) +# if (DEFINED MAMBA_BUILD) +# find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) +# else() + find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) +# endif(DEFINED MAMBA_BUILD) pkg_search_module(Qt6Core REQUIRED) pkg_search_module(Qt6Gui REQUIRED) pkg_search_module(Qt6Widgets REQUIRED) pkg_search_module(Qt6Network REQUIRED) pkg_search_module(Qt6Qml REQUIRED) endif(Qt5_FOUND) +endif(NOT DEFINED MAMBA_BUILD) # include directories diff --git a/codebase/apps/radar/src/HawkEye/CMakeLists.txt b/codebase/apps/radar/src/HawkEye/CMakeLists.txt index f0c2e8f37..5577eb51c 100644 --- a/codebase/apps/radar/src/HawkEye/CMakeLists.txt +++ b/codebase/apps/radar/src/HawkEye/CMakeLists.txt @@ -63,6 +63,7 @@ set (SRCS TimeScaleWidget.cc ) +if (NOT DEFINED MAMBA_BUILD) #Finding Qt find_package (Qt6 COMPONENTS Core QUIET) if (NOT Qt6_FOUND) @@ -76,32 +77,29 @@ else () message(FATAL_ERROR, "Qt not found.") endif(Qt5_FOUND) if(APPLE) - if (DEFINED MAMBA_BUILD) -# MAMBA builds ignore system libs, use mamba libs - if (Qt5_FOUND) - find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - elseif (Qt6_FOUND) - find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - endif(Qt5_FOUND) - else() - if (Qt5_FOUND) - find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH) - elseif (Qt6_FOUND) - find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH) - endif(Qt5_FOUND) - endif(DEFINED MAMBA_BUILD) + if (Qt5_FOUND) + find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) + elseif (Qt6_FOUND) + find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) + endif(Qt5_FOUND) +else() + if (Qt5_FOUND) + find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH) + elseif (Qt6_FOUND) + find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH) + endif(Qt5_FOUND) endif(APPLE) +endif(NOT DEFINED MAMBA_BUILD) set (CMAKE_INCLUDE_CURRENT_DIR ON) set (CMAKE_AUTOMOC ON) set (CMAKE_AUTORCC ON) set (CMAKE_AUTOUIC ON) +if (NOT DEFINED MAMBA_BUILD) if (Qt5_FOUND) -#QT5 - if (DEFINED MAMBA_BUILD) - find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - else() - find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) - endif(DEFINED MAMBA_BUILD) +# QT5 +# find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) +#else() + find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) pkg_search_module(Qt5Core REQUIRED) pkg_search_module(Qt5Gui REQUIRED) pkg_search_module(Qt5Widgets REQUIRED) @@ -109,17 +107,18 @@ if (Qt5_FOUND) pkg_search_module(Qt5Qml REQUIRED) else() #QT6 - if (DEFINED MAMBA_BUILD) - find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - else() - find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) - endif(DEFINED MAMBA_BUILD) +# if (DEFINED MAMBA_BUILD) +# find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) +# else() + find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) +# endif(DEFINED MAMBA_BUILD) pkg_search_module(Qt6Core REQUIRED) pkg_search_module(Qt6Gui REQUIRED) pkg_search_module(Qt6Widgets REQUIRED) pkg_search_module(Qt6Network REQUIRED) pkg_search_module(Qt6Qml REQUIRED) endif(Qt5_FOUND) +endif(NOT DEFINED MAMBA_BUILD) # include directories diff --git a/codebase/apps/radar/src/IpsEye/CMakeLists.txt b/codebase/apps/radar/src/IpsEye/CMakeLists.txt index 6134d393e..a816ced54 100644 --- a/codebase/apps/radar/src/IpsEye/CMakeLists.txt +++ b/codebase/apps/radar/src/IpsEye/CMakeLists.txt @@ -64,6 +64,7 @@ set (SRCS TimeScaleWidget.cc ) +if (NOT DEFINED MAMBA_BUILD) #Finding Qt find_package (Qt6 COMPONENTS Core QUIET) if (NOT Qt6_FOUND) @@ -77,32 +78,29 @@ else () message(FATAL_ERROR, "Qt not found.") endif(Qt5_FOUND) if(APPLE) - if (DEFINED MAMBA_BUILD) -# MAMBA builds ignore system libs, use mamba libs - if (Qt5_FOUND) - find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - elseif (Qt6_FOUND) - find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - endif(Qt5_FOUND) - else() - if (Qt5_FOUND) - find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH) - elseif (Qt6_FOUND) - find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH) - endif(Qt5_FOUND) - endif(DEFINED MAMBA_BUILD) + if (Qt5_FOUND) + find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) + elseif (Qt6_FOUND) + find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) + endif(Qt5_FOUND) +else() + if (Qt5_FOUND) + find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH) + elseif (Qt6_FOUND) + find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH) + endif(Qt5_FOUND) endif(APPLE) +endif(NOT DEFINED MAMBA_BUILD) set (CMAKE_INCLUDE_CURRENT_DIR ON) set (CMAKE_AUTOMOC ON) set (CMAKE_AUTORCC ON) set (CMAKE_AUTOUIC ON) +if (NOT DEFINED MAMBA_BUILD) if (Qt5_FOUND) -#QT5 - if (DEFINED MAMBA_BUILD) - find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - else() - find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) - endif(DEFINED MAMBA_BUILD) +# QT5 +# find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) +#else() + find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) pkg_search_module(Qt5Core REQUIRED) pkg_search_module(Qt5Gui REQUIRED) pkg_search_module(Qt5Widgets REQUIRED) @@ -110,17 +108,18 @@ if (Qt5_FOUND) pkg_search_module(Qt5Qml REQUIRED) else() #QT6 - if (DEFINED MAMBA_BUILD) - find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - else() - find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) - endif(DEFINED MAMBA_BUILD) +# if (DEFINED MAMBA_BUILD) +# find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) +# else() + find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) +# endif(DEFINED MAMBA_BUILD) pkg_search_module(Qt6Core REQUIRED) pkg_search_module(Qt6Gui REQUIRED) pkg_search_module(Qt6Widgets REQUIRED) pkg_search_module(Qt6Network REQUIRED) pkg_search_module(Qt6Qml REQUIRED) endif(Qt5_FOUND) +endif(NOT DEFINED MAMBA_BUILD) # include directories diff --git a/codebase/apps/radar/src/Sprite/CMakeLists.txt b/codebase/apps/radar/src/Sprite/CMakeLists.txt index cbfe11d2a..f91278554 100644 --- a/codebase/apps/radar/src/Sprite/CMakeLists.txt +++ b/codebase/apps/radar/src/Sprite/CMakeLists.txt @@ -33,6 +33,7 @@ set (SRCS SpriteWidget.cc ) +if (NOT DEFINED MAMBA_BUILD) #Finding Qt find_package (Qt6 COMPONENTS Core QUIET) if (NOT Qt6_FOUND) @@ -46,32 +47,29 @@ else () message(FATAL_ERROR, "Qt not found.") endif(Qt5_FOUND) if(APPLE) - if (DEFINED MAMBA_BUILD) -# MAMBA builds ignore system libs, use mamba libs - if (Qt5_FOUND) - find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - elseif (Qt6_FOUND) - find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - endif(Qt5_FOUND) - else() - if (Qt5_FOUND) - find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH) - elseif (Qt6_FOUND) - find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH) - endif(Qt5_FOUND) - endif(DEFINED MAMBA_BUILD) + if (Qt5_FOUND) + find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) + elseif (Qt6_FOUND) + find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) + endif(Qt5_FOUND) +else() + if (Qt5_FOUND) + find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH) + elseif (Qt6_FOUND) + find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH) + endif(Qt5_FOUND) endif(APPLE) +endif(NOT DEFINED MAMBA_BUILD) set (CMAKE_INCLUDE_CURRENT_DIR ON) set (CMAKE_AUTOMOC ON) set (CMAKE_AUTORCC ON) set (CMAKE_AUTOUIC ON) +if (NOT DEFINED MAMBA_BUILD) if (Qt5_FOUND) -#QT5 - if (DEFINED MAMBA_BUILD) - find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - else() - find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) - endif(DEFINED MAMBA_BUILD) +# QT5 +# find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) +#else() + find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) pkg_search_module(Qt5Core REQUIRED) pkg_search_module(Qt5Gui REQUIRED) pkg_search_module(Qt5Widgets REQUIRED) @@ -79,17 +77,18 @@ if (Qt5_FOUND) pkg_search_module(Qt5Qml REQUIRED) else() #QT6 - if (DEFINED MAMBA_BUILD) - find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - else() - find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) - endif(DEFINED MAMBA_BUILD) +# if (DEFINED MAMBA_BUILD) +# find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) +# else() + find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) +# endif(DEFINED MAMBA_BUILD) pkg_search_module(Qt6Core REQUIRED) pkg_search_module(Qt6Gui REQUIRED) pkg_search_module(Qt6Widgets REQUIRED) pkg_search_module(Qt6Network REQUIRED) pkg_search_module(Qt6Qml REQUIRED) endif(Qt5_FOUND) +endif(NOT DEFINED MAMBA_BUILD) # include directories diff --git a/codebase/libs/qtplot/src/CMakeLists.txt b/codebase/libs/qtplot/src/CMakeLists.txt index 3ade25d21..d4c792b71 100644 --- a/codebase/libs/qtplot/src/CMakeLists.txt +++ b/codebase/libs/qtplot/src/CMakeLists.txt @@ -11,6 +11,7 @@ project (libqtplot) +if (NOT DEFINED MAMBA_BUILD) #Finding Qt find_package (Qt6 COMPONENTS Core QUIET) if (NOT Qt6_FOUND) @@ -24,32 +25,29 @@ else () message(FATAL_ERROR, "Qt not found.") endif(Qt5_FOUND) if(APPLE) - if (DEFINED MAMBA_BUILD) -# MAMBA builds ignore system libs, use mamba libs - if (Qt5_FOUND) - find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - elseif (Qt6_FOUND) - find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - endif(Qt5_FOUND) - else() - if (Qt5_FOUND) - find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH) - elseif (Qt6_FOUND) - find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH) - endif(Qt5_FOUND) - endif(DEFINED MAMBA_BUILD) + if (Qt5_FOUND) + find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) + elseif (Qt6_FOUND) + find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) + endif(Qt5_FOUND) +else() + if (Qt5_FOUND) + find_path(Qt5_DIR NAMES Qt5Config.cmake qt5-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt5 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt5 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt5 NO_DEFAULT_PATH) + elseif (Qt6_FOUND) + find_path(Qt6_DIR NAMES Qt6Config.cmake qt6-config.cmake HINTS /usr/local/Cellar/qt/*/lib/cmake/Qt6 /opt/homebrew/Cellar/qt/*/lib/cmake/Qt6 $ENV{HOME}/homebrew/Cellar/qt/*/lib/cmake/Qt6 NO_DEFAULT_PATH) + endif(Qt5_FOUND) endif(APPLE) +endif(NOT DEFINED MAMBA_BUILD) set (CMAKE_INCLUDE_CURRENT_DIR ON) set (CMAKE_AUTOMOC ON) set (CMAKE_AUTORCC ON) set (CMAKE_AUTOUIC ON) +if (NOT DEFINED MAMBA_BUILD) if (Qt5_FOUND) -#QT5 - if (DEFINED MAMBA_BUILD) - find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - else() - find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) - endif(DEFINED MAMBA_BUILD) +# QT5 +# find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) +#else() + find_package (Qt5 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) pkg_search_module(Qt5Core REQUIRED) pkg_search_module(Qt5Gui REQUIRED) pkg_search_module(Qt5Widgets REQUIRED) @@ -57,17 +55,18 @@ if (Qt5_FOUND) pkg_search_module(Qt5Qml REQUIRED) else() #QT6 - if (DEFINED MAMBA_BUILD) - find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) - else() - find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) - endif(DEFINED MAMBA_BUILD) +# if (DEFINED MAMBA_BUILD) +# find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS ${MINIFORGE_ROOT} NO_DEFAULT_PATH) +# else() + find_package (Qt6 COMPONENTS Widgets Network Qml REQUIRED PATHS /usr /usr/local/opt/qt NO_DEFAULT_PATH) +# endif(DEFINED MAMBA_BUILD) pkg_search_module(Qt6Core REQUIRED) pkg_search_module(Qt6Gui REQUIRED) pkg_search_module(Qt6Widgets REQUIRED) pkg_search_module(Qt6Network REQUIRED) pkg_search_module(Qt6Qml REQUIRED) endif(Qt5_FOUND) +endif(NOT DEFINED MAMBA_BUILD) # include directories