Skip to content

Commit 0f5d1f0

Browse files
committed
Produce a module instead of an executable for Android
1 parent b0c28a1 commit 0f5d1f0

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Descent3/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,20 @@ endif()
288288

289289
file(GLOB_RECURSE INCS "../lib/*.h")
290290

291-
add_executable(Descent3 WIN32 ${HEADERS} ${CPPS} ${INCS})
291+
if(ANDROID)
292+
add_library(Descent3 MODULE ${HEADERS} ${CPPS} ${INCS}
293+
)
294+
else()
295+
add_executable(Descent3 WIN32 ${HEADERS} ${CPPS} ${INCS})
296+
install(TARGETS Descent3 RUNTIME)
297+
endif()
292298
target_link_libraries(Descent3 PRIVATE
293299
2dlib AudioEncode bitmap cfile czip d3music dd_video ddebug ddio libmve libacm
294300
fix grtext manage mem misc model module movie stream_audio linux SDL2::SDL2
295301
music networking physics renderer rtperformance sndlib ui unzip vecmat md5
296302
${PLATFORM_LIBS})
297303
target_include_directories(Descent3 PRIVATE ${PROJECT_BINARY_DIR}/lib)
298304
add_dependencies(Descent3 get_git_hash Direct_TCP_IP_Hog HogFull NetgamesDir Parallax_Online_Hog)
299-
install(TARGETS Descent3 RUNTIME)
300305

301306
if(BUILD_TESTING)
302307
add_subdirectory(tests)

0 commit comments

Comments
 (0)