Skip to content

Commit

Permalink
Merge branch 'master' into 'master'
Browse files Browse the repository at this point in the history
Navmeshtool as a Library

See merge request OpenMW/openmw!4354
  • Loading branch information
psi29a committed Sep 6, 2024
2 parents 46cbee2 + e920325 commit 8992a9f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 14 additions & 2 deletions apps/navmeshtool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,21 @@ set(NAVMESHTOOL
)
source_group(apps\\navmeshtool FILES ${NAVMESHTOOL})

openmw_add_executable(openmw-navmeshtool ${NAVMESHTOOL})
add_library(openmw-navmeshtool-lib STATIC
${NAVMESHTOOL}
)

if (ANDROID)
add_library(openmw-navmeshtool SHARED
main.cpp
)
else()
openmw_add_executable(openmw-navmeshtool ${NAVMESHTOOL})
endif()

target_link_libraries(openmw-navmeshtool openmw-navmeshtool-lib)

target_link_libraries(openmw-navmeshtool
target_link_libraries(openmw-navmeshtool-lib
Boost::program_options
components
)
Expand Down
4 changes: 4 additions & 0 deletions apps/navmeshtool/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,11 @@ namespace NavMeshTool
}
}

#ifdef ANDROID
extern "C" int SDL_main(int argc, char* argv[])
#else
int main(int argc, char* argv[])
#endif
{
return Debug::wrapApplication(NavMeshTool::runNavMeshTool, argc, argv, NavMeshTool::applicationName);
}

0 comments on commit 8992a9f

Please sign in to comment.