Skip to content

Commit 370995b

Browse files
Dan AlbertDanAlbert
authored andcommitted
Cleanup obsolete -u linker tricks.
We have a version of CMake new enough for whole-archive linking now. Use that instead.
1 parent 1aeb480 commit 370995b

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

hello-vulkan/app/src/main/cpp/CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,11 @@
1414
limitations under the License.
1515
#]]
1616

17-
cmake_minimum_required(VERSION 3.22.1)
17+
cmake_minimum_required(VERSION 4.1.0)
1818
project(hellovkjni)
1919

2020
# Include the GameActivity static lib to the project.
2121
find_package(game-activity REQUIRED CONFIG)
22-
set(CMAKE_SHARED_LINKER_FLAGS
23-
"${CMAKE_SHARED_LINKER_FLAGS} -u \
24-
Java_com_google_androidgamesdk_GameActivity_initializeNativeCode")
2522

2623
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
2724

@@ -36,6 +33,6 @@ add_library(${PROJECT_NAME} SHARED
3633
# add lib dependencies
3734
target_link_libraries(${PROJECT_NAME} PUBLIC
3835
vulkan
39-
game-activity::game-activity_static
36+
$<LINK_LIBRARY:WHOLE_ARCHIVE,game-activity::game-activity_static>
4037
android
4138
log)
Binary file not shown.

0 commit comments

Comments
 (0)