mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-06 19:12:30 +01:00
Add qt quick compiler and fix windows cmd opening in release
This commit is contained in:
parent
5fb1ea3a96
commit
a72c7ed149
@ -8,7 +8,7 @@ set(CMAKE_AUTOMOC ON)
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS Quick
|
||||
QML
|
||||
QuickCompiler
|
||||
Widgets
|
||||
Gui
|
||||
WebEngine
|
||||
@ -58,10 +58,23 @@ set(headers app.h
|
||||
src/util.h
|
||||
src/create.h)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set(resources Resources.qrc)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
qtquick_compiler_add_resources(${resources})
|
||||
endif()
|
||||
|
||||
|
||||
add_executable(${PROJECT_NAME} ${src} ${headers} ${resources})
|
||||
|
||||
# Disable console window on Windows
|
||||
# https://stackoverflow.com/questions/8249028/how-do-i-keep-my-qt-c-program-from-opening-a-console-in-windows
|
||||
set_property(TARGET ${PROJECT_NAME} PROPERTY WIN32_EXECUTABLE true)
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE "GIT_VERSION=${GIT_VERSION}")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
|
@ -10,6 +10,7 @@ find_package(
|
||||
Widgets
|
||||
Gui
|
||||
WebEngine
|
||||
QuickCompiler
|
||||
REQUIRED)
|
||||
|
||||
|
||||
@ -43,8 +44,18 @@ set( headers
|
||||
src/basewindow.h)
|
||||
|
||||
set(resources SPWResources.qrc)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
qtquick_compiler_add_resources(${resources})
|
||||
endif()
|
||||
|
||||
|
||||
add_executable(${PROJECT_NAME} ${src} ${headers} ${src_plattform} ${headers_plattform} ${resources})
|
||||
|
||||
# Disable console window on Windows
|
||||
# https://stackoverflow.com/questions/8249028/how-do-i-keep-my-qt-c-program-from-opening-a-console-in-windows
|
||||
set_property(TARGET ${PROJECT_NAME} PROPERTY WIN32_EXECUTABLE true)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
Qt5::Quick
|
||||
|
@ -8,6 +8,7 @@ find_package(
|
||||
COMPONENTS Quick
|
||||
Widgets
|
||||
Gui
|
||||
QuickCompiler
|
||||
WebEngine
|
||||
REQUIRED)
|
||||
|
||||
@ -20,8 +21,18 @@ set(headers
|
||||
set(resources
|
||||
SPWidgetResources.qrc)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
qtquick_compiler_add_resources(${resources})
|
||||
endif()
|
||||
|
||||
|
||||
add_executable(${PROJECT_NAME} ${src} ${headers} ${resources})
|
||||
|
||||
# Disable console window on Windows
|
||||
# https://stackoverflow.com/questions/8249028/how-do-i-keep-my-qt-c-program-from-opening-a-console-in-windows
|
||||
set_property(TARGET ${PROJECT_NAME} PROPERTY WIN32_EXECUTABLE true)
|
||||
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
Qt5::Quick
|
||||
|
Loading…
Reference in New Issue
Block a user