Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Herrie/qt6 #7

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,13 @@ else()
set(CAMERA_OUTPUT_DIR "C:/temp/luneos-camera")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -std=c++0x")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -std=c++1z")
add_definitions(-DCAMERA_OUTPUT_DIR="${CAMERA_OUTPUT_DIR}")

# Standard install paths. Needs to be set before finding packages.
include(GNUInstallDirs)

find_package(Qt5Qml)
find_package(Qt5Quick)
find_package(Qt5Multimedia)
find_package(Qt5Gui)
find_package(Qt6 REQUIRED COMPONENTS Qml Quick Multimedia Gui ShaderTools)

set(APP_DATA appinfo.json icon.png icon-256x256.png)
set(PLUGIN_DIR ${APP_DIR}/CameraApp)
Expand All @@ -56,4 +53,9 @@ install(DIRECTORY qml DESTINATION ${APP_DIR})
file(GLOB_RECURSE NON_COMPILED_FILES *.qml *.js *.svg *.png *.json *.sci qmldir)
add_custom_target(NON_COMPILED_TARGET ALL SOURCES ${NON_COMPILED_FILES})

qt6_add_shaders(org.webosports.app.camera "camera_shaders"
FILES
"qml/components/cornershader.frag"
)

add_subdirectory(CameraApp)
6 changes: 3 additions & 3 deletions CameraApp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ add_library(camera-qml MODULE ${plugin_SRCS} ${plugin_HDRS})
file(COPY qmldir DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

target_link_libraries(camera-qml
${Qt5Qml_LIBRARIES}
${Qt5Quick_LIBRARIES}
${Qt5Multimedia_LIBRARIES}
${Qt6Qml_LIBRARIES}
${Qt6Quick_LIBRARIES}
${Qt6Multimedia_LIBRARIES}
)

install(TARGETS camera-qml DESTINATION ${PLUGIN_DIR})
Expand Down
Loading