add Qt example, GTK example fixes, README update
This commit is contained in:
parent
350916588f
commit
33c3dcb512
9 changed files with 181 additions and 31 deletions
26
examples/ragephoto-qtviewer/CMakeLists.txt
Normal file
26
examples/ragephoto-qtviewer/CMakeLists.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
cmake_minimum_required(VERSION 3.7)
|
||||
project(ragephoto-qtviewer LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(FORCE_QT_VERSION "" CACHE STRING "Force Qt Version")
|
||||
if(FORCE_QT_VERSION)
|
||||
set(QT_VERSION_MAJOR ${FORCE_QT_VERSION})
|
||||
else()
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
||||
endif()
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)
|
||||
|
||||
set(QTVIEWER_SOURCES
|
||||
src/main.cpp
|
||||
)
|
||||
|
||||
if(TARGET ragephoto)
|
||||
add_executable(ragephoto-qtviewer ${QTVIEWER_SOURCES})
|
||||
target_link_libraries(ragephoto-qtviewer Qt${QT_VERSION_MAJOR}::Widgets ragephoto)
|
||||
target_include_directories(ragephoto-qtviewer PRIVATE ${RAGEPHOTO_INCLUDE_DIRS})
|
||||
else()
|
||||
message("ragephoto-qtviewer need to be build with libragephoto together")
|
||||
endif()
|
Loading…
Add table
Add a link
Reference in a new issue