WIP Port to CMake
This commit is contained in:
parent
135179e68d
commit
6e17f5d8fc
4 changed files with 42 additions and 0 deletions
36
CMakeLists.txt
Normal file
36
CMakeLists.txt
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
cmake_minimum_required(VERSION 3.19)
|
||||||
|
project(Sukai)
|
||||||
|
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
find_package(ECM ${KF_MIN_VERSION} NO_MODULE REQUIRED)
|
||||||
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
|
find_package(Qt6 COMPONENTS Core Gui Qml QuickControls2 QuickTest Test Widgets Quick Network REQUIRED)
|
||||||
|
find_package(KF6CoreAddons REQUIRED)
|
||||||
|
|
||||||
|
find_package(CxxQt QUIET)
|
||||||
|
if(NOT CxxQt_FOUND)
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
CxxQt
|
||||||
|
GIT_REPOSITORY https://github.com/kdab/cxx-qt-cmake.git
|
||||||
|
GIT_TAG main
|
||||||
|
)
|
||||||
|
|
||||||
|
FetchContent_MakeAvailable(CxxQt)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
cxx_qt_import_crate(
|
||||||
|
MANIFEST_PATH Cargo.toml
|
||||||
|
CRATES Sukai
|
||||||
|
QT_MODULES Qt::Core Qt::Gui Qt::Qml Qt::QuickControls2 Qt::Widgets Qt::Quick Qt::Network)
|
||||||
|
|
||||||
|
cxx_qt_import_qml_module(sukai_module
|
||||||
|
URI "com.redstrate.sukai"
|
||||||
|
SOURCE_CRATE Sukai)
|
||||||
|
|
||||||
|
add_executable(sukai cpp/main.cpp)
|
||||||
|
target_link_libraries(sukai PRIVATE sukai_module)
|
|
@ -3,6 +3,9 @@ name = "Sukai"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
crate-type = ["staticlib"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
cxx-qt-build = { git = "https://github.com/redstrate/cxx-qt", branch = "work/josh/add-qdatetime-from-string"}
|
cxx-qt-build = { git = "https://github.com/redstrate/cxx-qt", branch = "work/josh/add-qdatetime-from-string"}
|
||||||
|
|
||||||
|
|
3
cpp/main.cpp
Normal file
3
cpp/main.cpp
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
return 0;
|
||||||
|
}
|
0
src/lib.rs
Normal file
0
src/lib.rs
Normal file
Reference in a new issue