aboutsummaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorIvan Komissarov <ABBAPOH@gmail.com>2020-08-13 00:45:36 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2020-08-17 17:09:39 +0000
commitb67b08f1c2c26a226db6f43f2452026f85ad6460 (patch)
treee8aa41c51e6247919d531d9cd35737c98a360ff9 /src/app
parent2311a8224c3fc7141c44cc517f4ecdb882cd09f8 (diff)
Initial CMake port
This change allows to build Qbs using CMake build tool Tested platforms - Linux (gcc) - macOS (clang) - Windows (msvc2017) Missing features (compared to Qbs build) - Documentation build - Bundled QtScript support - Static build - .pc file for qbscore - qbs module for qbscore Change-Id: I09b5dadd6723d5a47e5ef2a9a38d3300488718f2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/CMakeLists.txt8
-rw-r--r--src/app/config-ui/CMakeLists.txt19
-rw-r--r--src/app/config/CMakeLists.txt13
-rw-r--r--src/app/qbs-create-project/CMakeLists.txt10
-rw-r--r--src/app/qbs-setup-android/CMakeLists.txt12
-rw-r--r--src/app/qbs-setup-qt/CMakeLists.txt12
-rw-r--r--src/app/qbs-setup-toolchains/CMakeLists.txt26
-rw-r--r--src/app/qbs/CMakeLists.txt50
-rw-r--r--src/app/shared/CMakeLists.txt1
-rw-r--r--src/app/shared/logging/CMakeLists.txt13
10 files changed, 164 insertions, 0 deletions
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
new file mode 100644
index 000000000..3a4ab38e0
--- /dev/null
+++ b/src/app/CMakeLists.txt
@@ -0,0 +1,8 @@
+add_subdirectory(config)
+add_subdirectory(config-ui)
+add_subdirectory(qbs)
+add_subdirectory(qbs-create-project)
+add_subdirectory(qbs-setup-android)
+add_subdirectory(qbs-setup-qt)
+add_subdirectory(qbs-setup-toolchains)
+add_subdirectory(shared)
diff --git a/src/app/config-ui/CMakeLists.txt b/src/app/config-ui/CMakeLists.txt
new file mode 100644
index 000000000..bced804c2
--- /dev/null
+++ b/src/app/config-ui/CMakeLists.txt
@@ -0,0 +1,19 @@
+set(SOURCES
+ commandlineparser.cpp
+ commandlineparser.h
+ main.cpp
+ mainwindow.cpp
+ mainwindow.h
+ mainwindow.ui
+ )
+
+# TODO: support Info.plist
+if(APPLE)
+ set(MACOS_SOURCES fgapp.mm)
+ set(MACOS_FRAMEWORKS "-framework ApplicationServices" "-framework Cocoa")
+endif()
+
+add_qbs_app(qbs-config-ui
+ DEPENDS corelib logginglib Qt5::Widgets ${MACOS_FRAMEWORKS}
+ SOURCES ${SOURCES} ${MACOS_SOURCES}
+ )
diff --git a/src/app/config/CMakeLists.txt b/src/app/config/CMakeLists.txt
new file mode 100644
index 000000000..67dd78483
--- /dev/null
+++ b/src/app/config/CMakeLists.txt
@@ -0,0 +1,13 @@
+set(SOURCES
+ configcommand.h
+ configcommandexecutor.cpp
+ configcommandexecutor.h
+ configcommandlineparser.cpp
+ configcommandlineparser.h
+ configmain.cpp
+ )
+
+add_qbs_app(qbs-config
+ DEPENDS corelib logginglib
+ SOURCES ${SOURCES}
+ )
diff --git a/src/app/qbs-create-project/CMakeLists.txt b/src/app/qbs-create-project/CMakeLists.txt
new file mode 100644
index 000000000..b3c1f75f5
--- /dev/null
+++ b/src/app/qbs-create-project/CMakeLists.txt
@@ -0,0 +1,10 @@
+set(SOURCES
+ createproject.cpp
+ createproject.h
+ create-project-main.cpp
+ )
+
+add_qbs_app(qbs-create-project
+ DEPENDS corelib logginglib
+ SOURCES ${SOURCES}
+ )
diff --git a/src/app/qbs-setup-android/CMakeLists.txt b/src/app/qbs-setup-android/CMakeLists.txt
new file mode 100644
index 000000000..97d0c8a60
--- /dev/null
+++ b/src/app/qbs-setup-android/CMakeLists.txt
@@ -0,0 +1,12 @@
+set(SOURCES
+ android-setup.cpp
+ android-setup.h
+ commandlineparser.cpp
+ commandlineparser.h
+ main.cpp
+ )
+
+add_qbs_app(qbs-setup-android
+ DEPENDS corelib logginglib
+ SOURCES ${SOURCES}
+ )
diff --git a/src/app/qbs-setup-qt/CMakeLists.txt b/src/app/qbs-setup-qt/CMakeLists.txt
new file mode 100644
index 000000000..55b86e3a2
--- /dev/null
+++ b/src/app/qbs-setup-qt/CMakeLists.txt
@@ -0,0 +1,12 @@
+set(SOURCES
+ commandlineparser.cpp
+ commandlineparser.h
+ main.cpp
+ setupqt.cpp
+ setupqt.h
+ )
+
+add_qbs_app(qbs-setup-qt
+ DEPENDS corelib logginglib
+ SOURCES ${SOURCES}
+ )
diff --git a/src/app/qbs-setup-toolchains/CMakeLists.txt b/src/app/qbs-setup-toolchains/CMakeLists.txt
new file mode 100644
index 000000000..9dc610bd3
--- /dev/null
+++ b/src/app/qbs-setup-toolchains/CMakeLists.txt
@@ -0,0 +1,26 @@
+set(SOURCES
+ clangclprobe.cpp
+ clangclprobe.h
+ commandlineparser.cpp
+ commandlineparser.h
+ gccprobe.cpp
+ gccprobe.h
+ iarewprobe.cpp
+ iarewprobe.h
+ keilprobe.cpp
+ keilprobe.h
+ main.cpp
+ msvcprobe.cpp
+ msvcprobe.h
+ probe.cpp
+ probe.h
+ sdccprobe.cpp
+ sdccprobe.h
+ xcodeprobe.cpp
+ xcodeprobe.h
+ )
+
+add_qbs_app(qbs-setup-toolchains
+ DEPENDS corelib logginglib
+ SOURCES ${SOURCES}
+ )
diff --git a/src/app/qbs/CMakeLists.txt b/src/app/qbs/CMakeLists.txt
new file mode 100644
index 000000000..009130426
--- /dev/null
+++ b/src/app/qbs/CMakeLists.txt
@@ -0,0 +1,50 @@
+set(SOURCES
+ application.cpp
+ application.h
+ commandlinefrontend.cpp
+ commandlinefrontend.h
+ consoleprogressobserver.cpp
+ consoleprogressobserver.h
+ ctrlchandler.cpp
+ ctrlchandler.h
+ main.cpp
+ qbstool.cpp
+ qbstool.h
+ session.cpp
+ session.h
+ sessionpacket.cpp
+ sessionpacket.h
+ sessionpacketreader.cpp
+ sessionpacketreader.h
+ status.cpp
+ status.h
+ stdinreader.cpp
+ stdinreader.h
+ )
+
+set(PARSER_SOURCES
+ commandlineoption.cpp
+ commandlineoption.h
+ commandlineoptionpool.cpp
+ commandlineoptionpool.h
+ commandlineparser.cpp
+ commandlineparser.h
+ commandpool.cpp
+ commandpool.h
+ commandtype.h
+ parsercommand.cpp
+ parsercommand.h
+ )
+list_transform_prepend(PARSER_SOURCES parser/)
+
+add_qbs_app(qbs
+ DEFINES
+ "QBS_VERSION=\"${QBS_VERSION}\""
+ "QBS_RELATIVE_LIBEXEC_PATH=\"${QBS_RELATIVE_LIBEXEC_PATH}\""
+ "QBS_RELATIVE_SEARCH_PATH=\"${QBS_RELATIVE_SEARCH_PATH}\""
+ "QBS_RELATIVE_PLUGINS_PATH=\"${QBS_RELATIVE_PLUGINS_PATH}\""
+ DEPENDS corelib logginglib
+ SOURCES ${SOURCES} ${PARSER_SOURCES}
+ )
+
+add_dependencies(qbs qbs_cpp_scanner qbs_qt_scanner)
diff --git a/src/app/shared/CMakeLists.txt b/src/app/shared/CMakeLists.txt
new file mode 100644
index 000000000..504db2b5b
--- /dev/null
+++ b/src/app/shared/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(logging)
diff --git a/src/app/shared/logging/CMakeLists.txt b/src/app/shared/logging/CMakeLists.txt
new file mode 100644
index 000000000..8fbeed184
--- /dev/null
+++ b/src/app/shared/logging/CMakeLists.txt
@@ -0,0 +1,13 @@
+set(SOURCES
+ coloredoutput.cpp
+ coloredoutput.h
+ consolelogger.cpp
+ consolelogger.h
+ )
+
+add_qbs_library(logginglib
+ STATIC
+ DEPENDS corelib
+ PUBLIC_INCLUDES $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../>
+ SOURCES ${SOURCES}
+ )