質問編集履歴
2
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,6 +5,157 @@
|
|
5
5
|
|
6
6
|
いくら調べても解決方法が見つからず、困っています。エラーの原因がわかる方がいれば、ご教授願います。
|
7
7
|
|
8
|
+
追記:CMakeLists.txtの中身です。
|
9
|
+
```ここに言語を入力
|
10
|
+
#/****************************************************************************
|
11
|
+
# Copyright (c) 2013-2014 cocos2d-x.org
|
12
|
+
# Copyright (c) 2015-2017 Chukong Technologies Inc.
|
13
|
+
#
|
14
|
+
# http://www.cocos2d-x.org
|
15
|
+
#
|
16
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
17
|
+
# of this software and associated documentation files (the "Software"), to deal
|
18
|
+
# in the Software without restriction, including without limitation the rights
|
19
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
20
|
+
# copies of the Software, and to permit persons to whom the Software is
|
21
|
+
# furnished to do so, subject to the following conditions:
|
22
|
+
|
23
|
+
# The above copyright notice and this permission notice shall be included in
|
24
|
+
# all copies or substantial portions of the Software.
|
25
|
+
|
26
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
27
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
28
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
29
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
30
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
31
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
32
|
+
# THE SOFTWARE.
|
33
|
+
# ****************************************************************************/
|
34
|
+
|
35
|
+
cmake_minimum_required(VERSION 3.6)
|
36
|
+
|
37
|
+
set(APP_NAME MyApp1)
|
38
|
+
|
39
|
+
project(${APP_NAME})
|
40
|
+
|
41
|
+
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cocos2d)
|
42
|
+
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
|
43
|
+
|
44
|
+
include(CocosBuildSet)
|
45
|
+
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
|
46
|
+
|
47
|
+
# record sources, headers, resources...
|
48
|
+
set(GAME_SOURCE)
|
49
|
+
set(GAME_HEADER)
|
50
|
+
|
51
|
+
set(GAME_RES_FOLDER
|
52
|
+
"${CMAKE_CURRENT_SOURCE_DIR}/Resources"
|
53
|
+
)
|
54
|
+
if(APPLE OR WINDOWS)
|
55
|
+
cocos_mark_multi_resources(common_res_files RES_TO "Resources" FOLDERS ${GAME_RES_FOLDER})
|
56
|
+
endif()
|
57
|
+
|
58
|
+
# add cross-platforms source files and header files
|
59
|
+
list(APPEND GAME_SOURCE
|
60
|
+
Classes/AppDelegate.cpp
|
61
|
+
Classes/HelloWorldScene.cpp
|
62
|
+
)
|
63
|
+
list(APPEND GAME_HEADER
|
64
|
+
Classes/AppDelegate.h
|
65
|
+
Classes/HelloWorldScene.h
|
66
|
+
)
|
67
|
+
|
68
|
+
if(ANDROID)
|
69
|
+
# change APP_NAME to the share library name for Android, it's value depend on AndroidManifest.xml
|
70
|
+
set(APP_NAME MyGame)
|
71
|
+
list(APPEND GAME_SOURCE
|
72
|
+
proj.android/app/jni/hellocpp/main.cpp
|
73
|
+
)
|
74
|
+
elseif(LINUX)
|
75
|
+
list(APPEND GAME_SOURCE
|
76
|
+
proj.linux/main.cpp
|
77
|
+
)
|
78
|
+
elseif(WINDOWS)
|
79
|
+
list(APPEND GAME_HEADER
|
80
|
+
proj.win32/main.h
|
81
|
+
proj.win32/resource.h
|
82
|
+
)
|
83
|
+
list(APPEND GAME_SOURCE
|
84
|
+
proj.win32/main.cpp
|
85
|
+
proj.win32/game.rc
|
86
|
+
${common_res_files}
|
87
|
+
)
|
88
|
+
elseif(APPLE)
|
89
|
+
if(IOS)
|
90
|
+
list(APPEND GAME_HEADER
|
91
|
+
proj.ios_mac/ios/AppController.h
|
92
|
+
proj.ios_mac/ios/RootViewController.h
|
93
|
+
)
|
94
|
+
set(APP_UI_RES
|
95
|
+
proj.ios_mac/ios/LaunchScreen.storyboard
|
96
|
+
proj.ios_mac/ios/LaunchScreenBackground.png
|
97
|
+
proj.ios_mac/ios/Images.xcassets
|
98
|
+
)
|
99
|
+
list(APPEND GAME_SOURCE
|
100
|
+
proj.ios_mac/ios/main.m
|
101
|
+
proj.ios_mac/ios/AppController.mm
|
102
|
+
proj.ios_mac/ios/RootViewController.mm
|
103
|
+
proj.ios_mac/ios/Prefix.pch
|
104
|
+
${APP_UI_RES}
|
105
|
+
)
|
106
|
+
elseif(MACOSX)
|
107
|
+
set(APP_UI_RES
|
108
|
+
proj.ios_mac/mac/Icon.icns
|
109
|
+
proj.ios_mac/mac/Info.plist
|
110
|
+
)
|
111
|
+
list(APPEND GAME_SOURCE
|
112
|
+
proj.ios_mac/mac/main.cpp
|
113
|
+
proj.ios_mac/mac/Prefix.pch
|
114
|
+
${APP_UI_RES}
|
115
|
+
)
|
116
|
+
endif()
|
117
|
+
list(APPEND GAME_SOURCE ${common_res_files})
|
118
|
+
endif()
|
119
|
+
|
120
|
+
# mark app complie info and libs info
|
121
|
+
set(all_code_files
|
122
|
+
${GAME_HEADER}
|
123
|
+
${GAME_SOURCE}
|
124
|
+
)
|
125
|
+
if(NOT ANDROID)
|
126
|
+
add_executable(${APP_NAME} ${all_code_files})
|
127
|
+
else()
|
128
|
+
add_library(${APP_NAME} SHARED ${all_code_files})
|
129
|
+
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos/platform/android ${ENGINE_BINARY_PATH}/cocos/platform)
|
130
|
+
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
|
131
|
+
endif()
|
132
|
+
|
133
|
+
target_link_libraries(${APP_NAME} cocos2d)
|
134
|
+
target_include_directories(${APP_NAME}
|
135
|
+
PRIVATE Classes
|
136
|
+
PRIVATE ${COCOS2DX_ROOT_PATH}/cocos/audio/include/
|
137
|
+
)
|
138
|
+
|
139
|
+
# mark app resources
|
140
|
+
setup_cocos_app_config(${APP_NAME})
|
141
|
+
if(APPLE)
|
142
|
+
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
|
143
|
+
if(MACOSX)
|
144
|
+
set_target_properties(${APP_NAME} PROPERTIES
|
145
|
+
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/mac/Info.plist"
|
146
|
+
)
|
147
|
+
elseif(IOS)
|
148
|
+
cocos_pak_xcode(${APP_NAME} INFO_PLIST "iOSBundleInfo.plist.in")
|
149
|
+
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
|
150
|
+
endif()
|
151
|
+
elseif(WINDOWS)
|
152
|
+
cocos_copy_target_dll(${APP_NAME} COPY_TO ${APP_RES_DIR}/..)
|
153
|
+
endif()
|
154
|
+
|
155
|
+
if(LINUX OR WINDOWS)
|
156
|
+
cocos_copy_res(COPY_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
|
157
|
+
endif()
|
158
|
+
```
|
8
159
|
### 補足情報(FW/ツールのバージョンなど)
|
9
160
|
|
10
161
|
Android Studio 3.3
|
1
誤字
title
CHANGED
File without changes
|
body
CHANGED
@@ -3,8 +3,6 @@
|
|
3
3
|
### 発生している問題・エラーメッセージ
|
4
4
|

|
5
5
|
|
6
|
-
|
7
|
-
Configure project:MyApp1
|
8
6
|
いくら調べても解決方法が見つからず、困っています。エラーの原因がわかる方がいれば、ご教授願います。
|
9
7
|
|
10
8
|
### 補足情報(FW/ツールのバージョンなど)
|