Skip to content

Commit

Permalink
Produce a module instead of an executable for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
tophyr committed Jun 26, 2024
1 parent 5d1705c commit 8207755
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Descent3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,20 @@ endif()

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

add_executable(Descent3 WIN32 ${HEADERS} ${CPPS} ${INCS})
if(ANDROID)
add_library(Descent3 MODULE ${HEADERS} ${CPPS} ${INCS}
)
else()
add_executable(Descent3 WIN32 ${HEADERS} ${CPPS} ${INCS})
install(TARGETS Descent3 RUNTIME)
endif()
target_link_libraries(Descent3 PRIVATE
2dlib AudioEncode bitmap cfile czip d3music dd_video ddebug ddio libmve libacm
fix grtext manage mem misc model module movie stream_audio linux SDL2::SDL2
music networking physics renderer rtperformance sndlib ui unzip vecmat md5
${PLATFORM_LIBS})
target_include_directories(Descent3 PRIVATE ${PROJECT_BINARY_DIR}/lib)
add_dependencies(Descent3 get_git_hash Direct_TCP_IP_Hog HogFull NetgamesDir Parallax_Online_Hog)
install(TARGETS Descent3 RUNTIME)

if(BUILD_TESTING)
add_subdirectory(tests)
Expand Down

0 comments on commit 8207755

Please sign in to comment.