From b371a5f90dcd6f9a28831cd59f4fd30490eccf1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Sun, 17 Apr 2022 21:01:49 +0200 Subject: [PATCH] Update following cmake_common changes. --- CMakeLists.txt | 10 ++++----- src/CMakeLists.txt | 14 ++++++------ src/SConscript | 49 ----------------------------------------- src/nxmhandler.pro | 54 ---------------------------------------------- src/nxmhandler.qbs | 30 -------------------------- 5 files changed, 12 insertions(+), 145 deletions(-) delete mode 100644 src/SConscript delete mode 100644 src/nxmhandler.pro delete mode 100644 src/nxmhandler.qbs diff --git a/CMakeLists.txt b/CMakeLists.txt index 2cf2fd8..926e949 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,10 @@ cmake_minimum_required(VERSION 3.16) -project(nxmhandler) -set(project_type exe) -set(enable_warnings OFF) - if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/project.cmake) + include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) else() - include(../cmake_common/project.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/../cmake_common/mo2.cmake) endif() + +project(nxmhandler) add_subdirectory(src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e3e6181..4f7984b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/src.cmake) -else() - include(../../cmake_common/src.cmake) -endif() -deploy_qt(BINARIES nxmhandler.exe NOPLUGINS) + +add_executable(nxmhandler) +mo2_configure_executable(nxmhandler + WARNINGS OFF + PRIVATE_DEPENDS uibase) +mo2_install_target(nxmhandler) + +mo2_deploy_qt(BINARIES nxmhandler.exe NOPLUGINS) diff --git a/src/SConscript b/src/SConscript deleted file mode 100644 index 479e46e..0000000 --- a/src/SConscript +++ /dev/null @@ -1,49 +0,0 @@ -Import('qt_env') - -env = qt_env.Clone() - -modules = [ - 'Core', - 'Gui', -] - -if env['QT_MAJOR_VERSION'] > 4: - modules += [ - 'Widgets', - ] - -env.EnableQtModules(*modules) - -env.Uic(Glob('*.ui')) - -env.RequireLibraries('uibase') - -env.AppendUnique(LIBS = [ - 'shell32', -]) - -# Note the order of this is important, or you can pick up the wrong report.h... -# Doing appendunique seems to throw the moc code into a tizzy -env['CPPPATH'] += [ - '.', # Why is this necessary? - '${BOOSTPATH}', -] - -env.AppendUnique(LINKFLAGS = [ - '/SUBSYSTEM:WINDOWS', - '${EXE_MANIFEST_DEPENDENCY}' -]) - -ic_env = env.Clone() -ic_env.AppendUnique(CPPPATH = '../organizer') -ic_env.AppendUnique(CPPDEFINES = 'SCONS_BUILD') -icon = ic_env.RES('app_icon.rc') -prog = env.Program('nxmhandler', env.Glob('*.cpp') + icon) - -env.InstallModule(prog) - -#release:QMAKE_CXXFLAGS += /Zi /GL -#release:QMAKE_LFLAGS += /DEBUG /LTCG /OPT:REF /OPT:ICF - -res = env['QT_USED_MODULES'] -Return('res') diff --git a/src/nxmhandler.pro b/src/nxmhandler.pro deleted file mode 100644 index 63405ad..0000000 --- a/src/nxmhandler.pro +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-06-16T16:14:14 -# -#------------------------------------------------- - -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -TARGET = nxmhandler -TEMPLATE = app - -!include(../LocalPaths.pri) { - message("paths to required libraries need to be set up in LocalPaths.pri") -} - - -SOURCES += main.cpp \ - handlerwindow.cpp \ - addbinarydialog.cpp \ - handlerstorage.cpp \ - logger.cpp - -HEADERS += \ - handlerwindow.h \ - addbinarydialog.h \ - handlerstorage.h \ - logger.h - -FORMS += \ - handlerwindow.ui \ - addbinarydialog.ui - -INCLUDEPATH += ../uibase "$${BOOSTPATH}" -LIBS += -luibase -lshell32 - -debug: LIBS += -L$$OUT_PWD/../uibase/debug -release:LIBS += -L$$OUT_PWD/../uibase/release - -release:QMAKE_CXXFLAGS += /Zi /GL -release:QMAKE_LFLAGS += /DEBUG /LTCG /OPT:REF /OPT:ICF - -QMAKE_POST_LINK += xcopy /y /I $$quote($$SRCDIR\\nxmhandler*.exe) $$quote($$DSTDIR) $$escape_expand(\\n) - -OTHER_FILES += \ - SConscript\ - app_icon.rc - -APP_ICON +=\ - app_icon.rc - -RC_FILE +=\ - app_icon.rc diff --git a/src/nxmhandler.qbs b/src/nxmhandler.qbs deleted file mode 100644 index 4afcee5..0000000 --- a/src/nxmhandler.qbs +++ /dev/null @@ -1,30 +0,0 @@ -import qbs.base 1.0 - -Application { - name: 'NXMHandler' - - Depends { name: 'Qt.core' } - Depends { name: 'Qt.gui' } - Depends { name: 'UIBase' } - Depends { name: 'cpp' } - - cpp.defines: [] - cpp.includePaths: [ '../uibase', qbs.getenv("BOOSTPATH") ] - - cpp.staticLibraries: [ 'shell32' ] - - Group { - name: 'Headers' - files: [ '*.h' ] - } - - Group { - name: 'Sources' - files: [ '*.cpp' ] - } - - Group { - name: 'UI Files' - files: [ '*.ui' ] - } -} \ No newline at end of file