-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
102 lines (81 loc) · 2.56 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
cmake_minimum_required(VERSION 3.16)
project(Cakebrewjs VERSION 2.70 LANGUAGES CXX)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
qt_standard_project_setup(REQUIRES 6.5)
## start custom
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(MACOSX TRUE)
endif()
if(MACOSX)
# Application icon
set(MACOSX_BUNDLE_ICON_FILE icon.icns)
set(APP_ICON_MACOSX ${CMAKE_CURRENT_SOURCE_DIR}/icon.icns)
set_source_files_properties(${APP_ICON_MACOSX} PROPERTIES
MACOSX_PACKAGE_LOCATION "Resources")
set(CPACK_PACKAGE_NAME Cakebrewjs)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Cakebrewjs")
set(CPACK_PACKAGE_VENDOR "shemeshg")
include(CPack)
endif()
## end custom
list(APPEND QML_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/Design/)
set(QML_IMPORT_PATH "${QML_DIRS}" CACHE STRING "Import paths for Qt Creator's code model" FORCE)
qt_add_executable(${CMAKE_PROJECT_NAME}
main.cpp ${APP_ICON_MACOSX}
)
qt_add_qml_module(${CMAKE_PROJECT_NAME}
URI shalom
VERSION 1.0
QML_FILES
Main.qml
)
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
# If you are developing for iOS or macOS you should consider setting an
# explicit, fixed bundle identifier manually though.
##
# set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES
# MACOSX_BUNDLE_GUI_IDENTIFIER com.example.appshalom
# MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
# MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
# MACOSX_BUNDLE TRUE
# WIN32_EXECUTABLE TRUE
# )
##
add_subdirectory(design/Design)
add_subdirectory(design/DesignContent)
add_subdirectory(design/Core)
add_subdirectory(Bal)
target_link_libraries(${CMAKE_PROJECT_NAME}
PRIVATE Qt6::Quick
Bal
Coreplugin
Designplugin
DesignContentplugin
)
include(GNUInstallDirs)
#
# install(TARGETS ${CMAKE_PROJECT_NAME}
# BUNDLE DESTINATION .
# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
# )
#
# Custom ADded
set_target_properties(Cakebrewjs PROPERTIES
WIN32_EXECUTABLE ON
MACOSX_BUNDLE ON
)
set_target_properties(Cakebrewjs PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER CakebrewJs.shemeshg.com
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
OUTPUT_NAME "CakebrewJs"
)
qt_generate_deploy_qml_app_script(
TARGET Cakebrewjs
OUTPUT_SCRIPT deploy_script
)
install(SCRIPT ${deploy_script})
# End custom Added