mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
Mod Cmake first working build
This commit is contained in:
parent
aacbe57d51
commit
83d802adf7
256
CMakeLists.txt
256
CMakeLists.txt
@ -57,17 +57,52 @@ set(QET_DIR ${PROJECT_SOURCE_DIR})
|
|||||||
#add_definitions(-DTODO_LIST)
|
#add_definitions(-DTODO_LIST)
|
||||||
|
|
||||||
# From De-Backer ik ben nog aan het testen.
|
# From De-Backer ik ben nog aan het testen.
|
||||||
#set(BUILD_QET_YES "yes")
|
set(BUILD_QET_YES "YES")
|
||||||
|
|
||||||
execute_process(
|
# https://github.com/itay-grudev/SingleApplication/issues/18
|
||||||
COMMAND git -C ${QET_DIR} rev-parse --verify HEAD
|
#qmake
|
||||||
OUTPUT_VARIABLE GIT_COMMIT_SHA)
|
#DEFINES += QAPPLICATION_CLASS=QGuiApplication
|
||||||
|
set(QAPPLICATION_CLASS QApplication)
|
||||||
|
|
||||||
# This strips terminating newline in the variable
|
find_package(Git QUIET)
|
||||||
string(REGEX REPLACE "\n$" "" GIT_COMMIT_SHA "${GIT_COMMIT_SHA}")
|
|
||||||
|
|
||||||
# This adds to definitions => .cpp
|
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
|
||||||
add_definitions(-DGIT_COMMIT_SHA="${GIT_COMMIT_SHA}")
|
# updates all git submodules
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
RESULT_VARIABLE GIT_SUBMOD_RESULT)
|
||||||
|
|
||||||
|
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
|
||||||
|
message(
|
||||||
|
FATAL_ERROR
|
||||||
|
"git submodule update --init failed with "
|
||||||
|
${GIT_SUBMOD_RESULT}
|
||||||
|
", please checkout submodules")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
|
||||||
|
#get GIT COMMIT SHA
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${GIT_EXECUTABLE} -C ${QET_DIR} rev-parse --verify HEAD
|
||||||
|
OUTPUT_VARIABLE GIT_COMMIT_SHA
|
||||||
|
RESULT_VARIABLE GIT_SUBMOD_RESULT)
|
||||||
|
|
||||||
|
# This strips terminating newline in the variable
|
||||||
|
string(REGEX REPLACE "\n$" "" GIT_COMMIT_SHA "${GIT_COMMIT_SHA}")
|
||||||
|
|
||||||
|
# This adds to definitions => .cpp
|
||||||
|
add_definitions(-DGIT_COMMIT_SHA="${GIT_COMMIT_SHA}")
|
||||||
|
|
||||||
|
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
|
||||||
|
message(
|
||||||
|
FATAL_ERROR
|
||||||
|
"git rev-parse --verify HEAD failed with "
|
||||||
|
${GIT_SUBMOD_RESULT}
|
||||||
|
", please check")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
message("PROJECT_NAME :" ${PROJECT_NAME})
|
message("PROJECT_NAME :" ${PROJECT_NAME})
|
||||||
message("PROJECT_SOURCE_DIR :" ${PROJECT_SOURCE_DIR})
|
message("PROJECT_SOURCE_DIR :" ${PROJECT_SOURCE_DIR})
|
||||||
@ -75,26 +110,48 @@ message("QET_DIR :" ${QET_DIR})
|
|||||||
message("GIT_COMMIT_SHA :" ${GIT_COMMIT_SHA})
|
message("GIT_COMMIT_SHA :" ${GIT_COMMIT_SHA})
|
||||||
|
|
||||||
Include(FetchContent)
|
Include(FetchContent)
|
||||||
set(KF5_GIT_TAG v5.76.0)
|
|
||||||
message("KF5_GIT_TAG :" ${KF5_GIT_TAG})
|
|
||||||
|
|
||||||
find_package(KF5CoreAddons)
|
#ToDo De-Backer
|
||||||
#---ToDo why you don't work :/
|
#set(BUILD_KF5_YES "YES")
|
||||||
#FetchContent_Declare(
|
|
||||||
# kcoreaddons
|
|
||||||
# GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
|
|
||||||
# GIT_TAG ${KF5_GIT_TAG})
|
|
||||||
#FetchContent_MakeAvailable(kcoreaddons)
|
|
||||||
#___ToDo
|
|
||||||
|
|
||||||
|
if(DEFINED BUILD_KF5_YES)
|
||||||
|
|
||||||
find_package(KF5WidgetsAddons)
|
if(NOT DEFINED KF5_GIT_TAG)
|
||||||
#FetchContent_Declare(
|
set(KF5_GIT_TAG v5.76.0)
|
||||||
# kwidgetsaddons
|
message("KF5_GIT_TAG :" ${KF5_GIT_TAG})
|
||||||
# GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
|
endif()
|
||||||
# GIT_TAG ${KF5_GIT_TAG})
|
|
||||||
|
|
||||||
#FetchContent_MakeAvailable(kwidgetsaddons)
|
#---ToDo why you don't work :/
|
||||||
|
FetchContent_Declare(
|
||||||
|
kcoreaddons
|
||||||
|
GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
|
||||||
|
GIT_TAG ${KF5_GIT_TAG})
|
||||||
|
FetchContent_MakeAvailable(kcoreaddons)
|
||||||
|
#___ToDo
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
kwidgetsaddons
|
||||||
|
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
|
||||||
|
GIT_TAG ${KF5_GIT_TAG})
|
||||||
|
FetchContent_MakeAvailable(kwidgetsaddons)
|
||||||
|
else()
|
||||||
|
find_package(KF5CoreAddons REQUIRED)
|
||||||
|
find_package(KF5WidgetsAddons REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
SingleApplication
|
||||||
|
GIT_REPOSITORY https://github.com/itay-grudev/SingleApplication.git
|
||||||
|
GIT_TAG v3.1.5)
|
||||||
|
|
||||||
|
FetchContent_MakeAvailable(SingleApplication)
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
pugixml
|
||||||
|
GIT_REPOSITORY https://github.com/zeux/pugixml.git
|
||||||
|
GIT_TAG v1.11.1)
|
||||||
|
|
||||||
|
FetchContent_MakeAvailable(pugixml)
|
||||||
|
|
||||||
set(QET_COMPONENTS
|
set(QET_COMPONENTS
|
||||||
Widgets
|
Widgets
|
||||||
@ -125,38 +182,40 @@ find_package(
|
|||||||
${QET_COMPONENTS}
|
${QET_COMPONENTS}
|
||||||
REQUIRED)
|
REQUIRED)
|
||||||
|
|
||||||
qt5_create_translation(
|
#qt5_create_translation(
|
||||||
QM_FILES
|
# QM_FILES
|
||||||
${CMAKE_SOURCE_DIR}
|
# ${CMAKE_SOURCE_DIR}
|
||||||
${QET_DIR}/lang/qet_ca.ts
|
# ${QET_DIR}/lang/qet_ca.ts
|
||||||
${QET_DIR}/lang/qet_de.ts
|
# ${QET_DIR}/lang/qet_de.ts
|
||||||
${QET_DIR}/lang/qet_es.ts
|
# ${QET_DIR}/lang/qet_es.ts
|
||||||
${QET_DIR}/lang/qet_fr.ts
|
# ${QET_DIR}/lang/qet_fr.ts
|
||||||
${QET_DIR}/lang/qet_it.ts
|
# ${QET_DIR}/lang/qet_it.ts
|
||||||
${QET_DIR}/lang/qet_mn.ts
|
# ${QET_DIR}/lang/qet_mn.ts
|
||||||
${QET_DIR}/lang/qet_pt_br.ts
|
# ${QET_DIR}/lang/qet_pt_br.ts
|
||||||
${QET_DIR}/lang/qet_ru.ts
|
# ${QET_DIR}/lang/qet_ru.ts
|
||||||
${QET_DIR}/lang/qet_sr.ts
|
# ${QET_DIR}/lang/qet_sr.ts
|
||||||
${QET_DIR}/lang/qet_zh.ts
|
# ${QET_DIR}/lang/qet_zh.ts
|
||||||
${QET_DIR}/lang/qet_be.ts
|
# ${QET_DIR}/lang/qet_be.ts
|
||||||
${QET_DIR}/lang/qet_da.ts
|
# ${QET_DIR}/lang/qet_da.ts
|
||||||
${QET_DIR}/lang/qet_en.ts
|
# ${QET_DIR}/lang/qet_en.ts
|
||||||
${QET_DIR}/lang/qet_fi.ts
|
# ${QET_DIR}/lang/qet_fi.ts
|
||||||
${QET_DIR}/lang/qet_hu.ts
|
# ${QET_DIR}/lang/qet_hu.ts
|
||||||
${QET_DIR}/lang/qet_nl.ts
|
# ${QET_DIR}/lang/qet_nl.ts
|
||||||
${QET_DIR}/lang/qet_pl.ts
|
# ${QET_DIR}/lang/qet_pl.ts
|
||||||
${QET_DIR}/lang/qet_ro.ts
|
# ${QET_DIR}/lang/qet_ro.ts
|
||||||
${QET_DIR}/lang/qet_sk.ts
|
# ${QET_DIR}/lang/qet_sk.ts
|
||||||
${QET_DIR}/lang/qet_ar.ts
|
# ${QET_DIR}/lang/qet_ar.ts
|
||||||
${QET_DIR}/lang/qet_cs.ts
|
# ${QET_DIR}/lang/qet_cs.ts
|
||||||
${QET_DIR}/lang/qet_el.ts
|
# ${QET_DIR}/lang/qet_el.ts
|
||||||
${QET_DIR}/lang/qet_hr.ts
|
# ${QET_DIR}/lang/qet_hr.ts
|
||||||
${QET_DIR}/lang/qet_ja.ts
|
# ${QET_DIR}/lang/qet_ja.ts
|
||||||
${QET_DIR}/lang/qet_nb.ts
|
# ${QET_DIR}/lang/qet_nb.ts
|
||||||
${QET_DIR}/lang/qet_no.ts
|
# ${QET_DIR}/lang/qet_no.ts
|
||||||
${QET_DIR}/lang/qet_pt.ts
|
# ${QET_DIR}/lang/qet_pt.ts
|
||||||
${QET_DIR}/lang/qet_sl.ts
|
# ${QET_DIR}/lang/qet_sl.ts
|
||||||
${QET_DIR}/lang/qet_tr.ts)
|
# ${QET_DIR}/lang/qet_tr.ts)
|
||||||
|
|
||||||
|
set(CMAKE_AUTOUIC_SEARCH_PATHS ${QET_DIR}/sources/ui)
|
||||||
|
|
||||||
set(QET_SRC_FILES
|
set(QET_SRC_FILES
|
||||||
${QET_DIR}/sources/borderproperties.cpp
|
${QET_DIR}/sources/borderproperties.cpp
|
||||||
@ -674,7 +733,7 @@ if(DEFINED BUILD_QET_YES)
|
|||||||
add_executable(
|
add_executable(
|
||||||
${PROJECT_NAME}
|
${PROJECT_NAME}
|
||||||
${QET_SRC_FILES}
|
${QET_SRC_FILES}
|
||||||
${QM_FILES}
|
# ${QM_FILES}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
@ -695,6 +754,8 @@ target_link_libraries(
|
|||||||
${PROJECT_NAME}
|
${PROJECT_NAME}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
pugixml::pugixml
|
||||||
|
SingleApplication::SingleApplication
|
||||||
KF5::WidgetsAddons
|
KF5::WidgetsAddons
|
||||||
KF5::CoreAddons
|
KF5::CoreAddons
|
||||||
Qt5::Gui
|
Qt5::Gui
|
||||||
@ -704,46 +765,53 @@ target_link_libraries(
|
|||||||
Qt5::Sql
|
Qt5::Sql
|
||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
Qt5::Concurrent)
|
Qt5::Concurrent)
|
||||||
|
|
||||||
|
target_include_directories(
|
||||||
|
${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
${QET_DIR}/sources/titleblock
|
||||||
|
${QET_DIR}/sources/ui
|
||||||
|
${QET_DIR}/sources/qetgraphicsitem
|
||||||
|
${QET_DIR}/sources/qetgraphicsitem/ViewItem
|
||||||
|
${QET_DIR}/sources/qetgraphicsitem/ViewItem/ui
|
||||||
|
${QET_DIR}/sources/richtext
|
||||||
|
${QET_DIR}/sources/factory
|
||||||
|
${QET_DIR}/sources/properties
|
||||||
|
${QET_DIR}/sources/dvevent
|
||||||
|
${QET_DIR}/sources/editor
|
||||||
|
${QET_DIR}/sources/editor/esevent
|
||||||
|
${QET_DIR}/sources/editor/graphicspart
|
||||||
|
${QET_DIR}/sources/editor/ui
|
||||||
|
${QET_DIR}/sources/editor/UndoCommand
|
||||||
|
${QET_DIR}/sources/undocommand
|
||||||
|
${QET_DIR}/sources/diagramevent
|
||||||
|
${QET_DIR}/sources/ElementsCollection
|
||||||
|
${QET_DIR}/sources/ElementsCollection/ui
|
||||||
|
${QET_DIR}/sources/autoNum
|
||||||
|
${QET_DIR}/sources/autoNum/ui
|
||||||
|
${QET_DIR}/sources/ui/configpage
|
||||||
|
${QET_DIR}/sources/SearchAndReplace
|
||||||
|
${QET_DIR}/sources/SearchAndReplace/ui
|
||||||
|
${QET_DIR}/sources/NameList
|
||||||
|
${QET_DIR}/sources/NameList/ui
|
||||||
|
${QET_DIR}/sources/utils
|
||||||
|
${QET_DIR}/sources/pugixml
|
||||||
|
${QET_DIR}/sources/dataBase
|
||||||
|
${QET_DIR}/sources/dataBase/ui
|
||||||
|
${QET_DIR}/sources/factory/ui
|
||||||
|
${QET_DIR}/sources/print
|
||||||
|
)
|
||||||
|
# ${QET_DIR}/SingleApplication
|
||||||
else()
|
else()
|
||||||
message("!! sorry now Cmake can't get QET builds yet !!")
|
message("!! sorry now Cmake can't get QET builds yet !!")
|
||||||
endif()
|
endif()
|
||||||
# target_include_directories(
|
|
||||||
# ${PROJECT_NAME}
|
|
||||||
# PRIVATE
|
|
||||||
# ${QET_DIR}/sources/titleblock
|
|
||||||
# ${QET_DIR}/sources/ui
|
|
||||||
# ${QET_DIR}/sources/qetgraphicsitem
|
|
||||||
# ${QET_DIR}/sources/qetgraphicsitem/ViewItem
|
|
||||||
# ${QET_DIR}/sources/qetgraphicsitem/ViewItem/ui
|
|
||||||
# ${QET_DIR}/sources/richtext
|
|
||||||
# ${QET_DIR}/sources/factory
|
|
||||||
# ${QET_DIR}/sources/properties
|
|
||||||
# ${QET_DIR}/sources/dvevent
|
|
||||||
# ${QET_DIR}/sources/editor
|
|
||||||
# ${QET_DIR}/sources/editor/esevent
|
|
||||||
# ${QET_DIR}/sources/editor/graphicspart
|
|
||||||
# ${QET_DIR}/sources/editor/ui
|
|
||||||
# ${QET_DIR}/sources/editor/UndoCommand
|
|
||||||
# ${QET_DIR}/sources/undocommand
|
|
||||||
# ${QET_DIR}/sources/diagramevent
|
|
||||||
# ${QET_DIR}/sources/ElementsCollection
|
|
||||||
# ${QET_DIR}/sources/ElementsCollection/ui
|
|
||||||
# ${QET_DIR}/sources/autoNum
|
|
||||||
# ${QET_DIR}/sources/autoNum/ui
|
|
||||||
# ${QET_DIR}/sources/ui/configpage
|
|
||||||
# ${QET_DIR}/sources/SearchAndReplace
|
|
||||||
# ${QET_DIR}/sources/SearchAndReplace/ui
|
|
||||||
# ${QET_DIR}/sources/NameList
|
|
||||||
# ${QET_DIR}/sources/NameList/ui
|
|
||||||
# ${QET_DIR}/sources/utils
|
|
||||||
# ${QET_DIR}/sources/pugixml
|
|
||||||
# ${QET_DIR}/sources/dataBase
|
|
||||||
# ${QET_DIR}/sources/dataBase/ui
|
|
||||||
# ${QET_DIR}/sources/factory/ui
|
|
||||||
# ${QET_DIR}/sources/print
|
|
||||||
# )
|
|
||||||
|
|
||||||
# Add sub directories
|
# Add sub directories
|
||||||
message("Add sub directorie tests")
|
option(PACKAGE_TESTS "Build the tests" ON)
|
||||||
add_subdirectory(tests)
|
|
||||||
|
if(PACKAGE_TESTS)
|
||||||
|
enable_testing()
|
||||||
|
message("Add sub directorie tests")
|
||||||
|
add_subdirectory(tests)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "../SingleApplication/singleapplication.h"
|
|
||||||
#include "machine_info.h"
|
#include "machine_info.h"
|
||||||
#include "qet.h"
|
#include "qet.h"
|
||||||
#include "qetapp.h"
|
#include "qetapp.h"
|
||||||
|
#include "singleapplication.h"
|
||||||
#include "utils/macosxopenevent.h"
|
#include "utils/macosxopenevent.h"
|
||||||
|
|
||||||
#include <QStyleFactory>
|
#include <QStyleFactory>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "macosxopenevent.h"
|
#include "macosxopenevent.h"
|
||||||
|
|
||||||
#include "SingleApplication/singleapplication.h"
|
#include "singleapplication.h"
|
||||||
|
|
||||||
#include <QFileOpenEvent>
|
#include <QFileOpenEvent>
|
||||||
|
|
||||||
|
@ -76,27 +76,31 @@ FetchContent_Declare(
|
|||||||
|
|
||||||
FetchContent_MakeAvailable(Catch2)
|
FetchContent_MakeAvailable(Catch2)
|
||||||
|
|
||||||
if(NOT DEFINED KF5_GIT_TAG)
|
if(DEFINED BUILD_KF5_YES)
|
||||||
set(KF5_GIT_TAG v5.76.0)
|
|
||||||
message(".. KF5_GIT_TAG :" ${KF5_GIT_TAG})
|
if(NOT DEFINED KF5_GIT_TAG)
|
||||||
|
set(KF5_GIT_TAG v5.76.0)
|
||||||
|
message(".. KF5_GIT_TAG :" ${KF5_GIT_TAG})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#---ToDo why you don't work :/
|
||||||
|
FetchContent_Declare(
|
||||||
|
kcoreaddons
|
||||||
|
GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
|
||||||
|
GIT_TAG ${KF5_GIT_TAG})
|
||||||
|
FetchContent_MakeAvailable(kcoreaddons)
|
||||||
|
#___ToDo
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
kwidgetsaddons
|
||||||
|
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
|
||||||
|
GIT_TAG ${KF5_GIT_TAG})
|
||||||
|
FetchContent_MakeAvailable(kwidgetsaddons)
|
||||||
|
else()
|
||||||
|
find_package(KF5CoreAddons REQUIRED)
|
||||||
|
find_package(KF5WidgetsAddons REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(KF5CoreAddons REQUIRED)
|
|
||||||
#---ToDo why you don't work :/
|
|
||||||
#FetchContent_Declare(
|
|
||||||
# kcoreaddons
|
|
||||||
# GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
|
|
||||||
# GIT_TAG ${KF5_GIT_TAG})
|
|
||||||
#FetchContent_MakeAvailable(kcoreaddons)
|
|
||||||
#___ToDo
|
|
||||||
|
|
||||||
FetchContent_Declare(
|
|
||||||
kwidgetsaddons
|
|
||||||
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
|
|
||||||
GIT_TAG ${KF5_GIT_TAG})
|
|
||||||
|
|
||||||
FetchContent_MakeAvailable(kwidgetsaddons)
|
|
||||||
|
|
||||||
add_executable(
|
add_executable(
|
||||||
${PROJECT_NAME}
|
${PROJECT_NAME}
|
||||||
tst_My_test.cpp
|
tst_My_test.cpp
|
||||||
|
@ -76,27 +76,31 @@ FetchContent_Declare(
|
|||||||
|
|
||||||
FetchContent_MakeAvailable(GTest)
|
FetchContent_MakeAvailable(GTest)
|
||||||
|
|
||||||
if(NOT DEFINED KF5_GIT_TAG)
|
if(DEFINED BUILD_KF5_YES)
|
||||||
set(KF5_GIT_TAG v5.76.0)
|
|
||||||
message(".. KF5_GIT_TAG :" ${KF5_GIT_TAG})
|
if(NOT DEFINED KF5_GIT_TAG)
|
||||||
|
set(KF5_GIT_TAG v5.76.0)
|
||||||
|
message(".. KF5_GIT_TAG :" ${KF5_GIT_TAG})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#---ToDo why you don't work :/
|
||||||
|
FetchContent_Declare(
|
||||||
|
kcoreaddons
|
||||||
|
GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
|
||||||
|
GIT_TAG ${KF5_GIT_TAG})
|
||||||
|
FetchContent_MakeAvailable(kcoreaddons)
|
||||||
|
#___ToDo
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
kwidgetsaddons
|
||||||
|
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
|
||||||
|
GIT_TAG ${KF5_GIT_TAG})
|
||||||
|
FetchContent_MakeAvailable(kwidgetsaddons)
|
||||||
|
else()
|
||||||
|
find_package(KF5CoreAddons REQUIRED)
|
||||||
|
find_package(KF5WidgetsAddons REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(KF5CoreAddons REQUIRED)
|
|
||||||
#---ToDo why you don't work :/
|
|
||||||
#FetchContent_Declare(
|
|
||||||
# kcoreaddons
|
|
||||||
# GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
|
|
||||||
# GIT_TAG ${KF5_GIT_TAG})
|
|
||||||
#FetchContent_MakeAvailable(kcoreaddons)
|
|
||||||
#___ToDo
|
|
||||||
|
|
||||||
FetchContent_Declare(
|
|
||||||
kwidgetsaddons
|
|
||||||
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
|
|
||||||
GIT_TAG ${KF5_GIT_TAG})
|
|
||||||
|
|
||||||
FetchContent_MakeAvailable(kwidgetsaddons)
|
|
||||||
|
|
||||||
add_executable(
|
add_executable(
|
||||||
${PROJECT_NAME}
|
${PROJECT_NAME}
|
||||||
tst_My_test.cpp
|
tst_My_test.cpp
|
||||||
|
@ -76,27 +76,31 @@ FetchContent_Declare(
|
|||||||
|
|
||||||
FetchContent_MakeAvailable(GTest)
|
FetchContent_MakeAvailable(GTest)
|
||||||
|
|
||||||
if(NOT DEFINED KF5_GIT_TAG)
|
if(DEFINED BUILD_KF5_YES)
|
||||||
set(KF5_GIT_TAG v5.76.0)
|
|
||||||
message(".. KF5_GIT_TAG :" ${KF5_GIT_TAG})
|
if(NOT DEFINED KF5_GIT_TAG)
|
||||||
|
set(KF5_GIT_TAG v5.76.0)
|
||||||
|
message(".. KF5_GIT_TAG :" ${KF5_GIT_TAG})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#---ToDo why you don't work :/
|
||||||
|
FetchContent_Declare(
|
||||||
|
kcoreaddons
|
||||||
|
GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
|
||||||
|
GIT_TAG ${KF5_GIT_TAG})
|
||||||
|
FetchContent_MakeAvailable(kcoreaddons)
|
||||||
|
#___ToDo
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
kwidgetsaddons
|
||||||
|
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
|
||||||
|
GIT_TAG ${KF5_GIT_TAG})
|
||||||
|
FetchContent_MakeAvailable(kwidgetsaddons)
|
||||||
|
else()
|
||||||
|
find_package(KF5CoreAddons REQUIRED)
|
||||||
|
find_package(KF5WidgetsAddons REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(KF5CoreAddons REQUIRED)
|
|
||||||
#---ToDo why you don't work :/
|
|
||||||
#FetchContent_Declare(
|
|
||||||
# kcoreaddons
|
|
||||||
# GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
|
|
||||||
# GIT_TAG ${KF5_GIT_TAG})
|
|
||||||
#FetchContent_MakeAvailable(kcoreaddons)
|
|
||||||
#___ToDo
|
|
||||||
|
|
||||||
FetchContent_Declare(
|
|
||||||
kwidgetsaddons
|
|
||||||
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
|
|
||||||
GIT_TAG ${KF5_GIT_TAG})
|
|
||||||
|
|
||||||
FetchContent_MakeAvailable(kwidgetsaddons)
|
|
||||||
|
|
||||||
add_executable(
|
add_executable(
|
||||||
${PROJECT_NAME}
|
${PROJECT_NAME}
|
||||||
tst_My_test.cpp
|
tst_My_test.cpp
|
||||||
|
@ -71,31 +71,31 @@ find_package(
|
|||||||
|
|
||||||
Include(FetchContent)
|
Include(FetchContent)
|
||||||
|
|
||||||
if(NOT DEFINED KF5_GIT_TAG)
|
if(DEFINED BUILD_KF5_YES)
|
||||||
set(KF5_GIT_TAG v5.76.0)
|
|
||||||
message(".. KF5_GIT_TAG :" ${KF5_GIT_TAG})
|
if(NOT DEFINED KF5_GIT_TAG)
|
||||||
|
set(KF5_GIT_TAG v5.76.0)
|
||||||
|
message(".. KF5_GIT_TAG :" ${KF5_GIT_TAG})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#---ToDo why you don't work :/
|
||||||
|
FetchContent_Declare(
|
||||||
|
kcoreaddons
|
||||||
|
GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
|
||||||
|
GIT_TAG ${KF5_GIT_TAG})
|
||||||
|
FetchContent_MakeAvailable(kcoreaddons)
|
||||||
|
#___ToDo
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
kwidgetsaddons
|
||||||
|
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
|
||||||
|
GIT_TAG ${KF5_GIT_TAG})
|
||||||
|
FetchContent_MakeAvailable(kwidgetsaddons)
|
||||||
|
else()
|
||||||
|
find_package(KF5CoreAddons REQUIRED)
|
||||||
|
find_package(KF5WidgetsAddons REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(KF5CoreAddons REQUIRED)
|
|
||||||
#---ToDo why you don't work :/
|
|
||||||
message(".. FetchContent_Declare kcoreaddons")
|
|
||||||
#FetchContent_Declare(
|
|
||||||
# kcoreaddons
|
|
||||||
# GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
|
|
||||||
# GIT_TAG ${KF5_GIT_TAG})
|
|
||||||
#message(".. FetchContent_MakeAvailable kcoreaddons")
|
|
||||||
#FetchContent_MakeAvailable(kcoreaddons)
|
|
||||||
#___ToDo
|
|
||||||
|
|
||||||
message(".. FetchContent_Declare kwidgetsaddons")
|
|
||||||
FetchContent_Declare(
|
|
||||||
kwidgetsaddons
|
|
||||||
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
|
|
||||||
GIT_TAG ${KF5_GIT_TAG})
|
|
||||||
|
|
||||||
message(".. FetchContent_MakeAvailable kwidgetsaddons")
|
|
||||||
FetchContent_MakeAvailable(kwidgetsaddons)
|
|
||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} tst_mytest.cpp)
|
add_executable(${PROJECT_NAME} tst_mytest.cpp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user