-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from itzurabhi/feature/cmake-build
Feature : Add CMake build
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
cmake_minimum_required(VERSION 3.3) | ||
project(QSimpleUpdater | ||
LANGUAGES CXX | ||
) | ||
|
||
set(CMAKE_AUTOUIC ON) | ||
set(CMAKE_AUTORCC ON) | ||
set(CMAKE_AUTOMOC ON) | ||
|
||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Network) | ||
find_package(Qt${QT_VERSION_MAJOR} CONFIG REQUIRED COMPONENTS Widgets Network) | ||
|
||
add_library(QSimpleUpdater STATIC | ||
etc/resources/qsimpleupdater.qrc | ||
include/QSimpleUpdater.h | ||
src/Downloader.cpp | ||
src/Downloader.h | ||
src/Downloader.ui | ||
src/QSimpleUpdater.cpp | ||
src/Updater.cpp | ||
src/Updater.h | ||
) | ||
target_include_directories(QSimpleUpdater PUBLIC include) | ||
target_link_libraries(QSimpleUpdater PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets PRIVATE Qt${QT_VERSION_MAJOR}::Network) | ||
|
||
add_subdirectory(tutorial) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
project(QSU_Tutorial | ||
LANGUAGES CXX | ||
) | ||
|
||
add_executable(QSU_Tutorial WIN32 MACOSX_BUNDLE EXCLUDE_FROM_ALL | ||
src/Window.ui | ||
src/Window.h | ||
src/Window.cpp | ||
src/main.cpp | ||
) | ||
target_compile_definitions(QSimpleUpdater PUBLIC QSU_INCLUDE_MOC) | ||
target_link_libraries(QSU_Tutorial QSimpleUpdater) |