mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-19 21:40:45 +00:00
Keep separation between openmw and openmw-lib on Android
They are not set up properly so CMake configuration fails because of not found openmw-lib target since it's not defined for Android.
This commit is contained in:
parent
b1de8ed720
commit
b3abc436dd
@ -8,10 +8,6 @@ set(OPENMW_RESOURCES
|
|||||||
${CMAKE_SOURCE_DIR}/files/windows/openmw.exe.manifest
|
${CMAKE_SOURCE_DIR}/files/windows/openmw.exe.manifest
|
||||||
)
|
)
|
||||||
|
|
||||||
if (ANDROID)
|
|
||||||
set(OPENMW_SOURCES ${OPENMW_SOURCES} android_main.cpp)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(OPENMW_HEADERS
|
set(OPENMW_HEADERS
|
||||||
doc.hpp
|
doc.hpp
|
||||||
engine.hpp
|
engine.hpp
|
||||||
@ -19,7 +15,7 @@ set(OPENMW_HEADERS
|
|||||||
profile.hpp
|
profile.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
source_group(apps/openmw FILES main.cpp ${OPENMW_SOURCES} ${OPENMW_HEADERS} ${OPENMW_RESOURCES})
|
source_group(apps/openmw FILES main.cpp android_main.cpp ${OPENMW_SOURCES} ${OPENMW_HEADERS} ${OPENMW_RESOURCES})
|
||||||
|
|
||||||
add_openmw_dir (mwrender
|
add_openmw_dir (mwrender
|
||||||
actors objects renderingmanager animation rotatecontroller sky skyutil npcanimation esm4npcanimation vismask
|
actors objects renderingmanager animation rotatecontroller sky skyutil npcanimation esm4npcanimation vismask
|
||||||
@ -122,23 +118,22 @@ add_openmw_dir (mwbase
|
|||||||
|
|
||||||
# Main executable
|
# Main executable
|
||||||
|
|
||||||
if (NOT ANDROID)
|
add_library(openmw-lib STATIC
|
||||||
add_library(openmw-lib STATIC
|
${OPENMW_FILES}
|
||||||
${OPENMW_FILES}
|
${OPENMW_SOURCES}
|
||||||
${OPENMW_SOURCES}
|
)
|
||||||
)
|
|
||||||
|
|
||||||
# Otherwise linker fails with LNK1149 because main.cpp has __declspec(dllexport)
|
# Otherwise linker fails with LNK1149 because main.cpp has __declspec(dllexport)
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
set_target_properties(openmw-lib PROPERTIES OUTPUT_NAME openmw)
|
set_target_properties(openmw-lib PROPERTIES OUTPUT_NAME openmw)
|
||||||
endif()
|
endif()
|
||||||
endif ()
|
|
||||||
|
|
||||||
if(BUILD_OPENMW)
|
if(BUILD_OPENMW)
|
||||||
if (ANDROID)
|
if (ANDROID)
|
||||||
add_library(openmw-lib SHARED
|
add_library(openmw SHARED
|
||||||
${OPENMW_FILES}
|
${OPENMW_FILES}
|
||||||
${OPENMW_SOURCES}
|
main.cpp
|
||||||
|
android_main.cpp
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
openmw_add_executable(openmw
|
openmw_add_executable(openmw
|
||||||
@ -146,9 +141,9 @@ if(BUILD_OPENMW)
|
|||||||
${OPENMW_RESOURCES}
|
${OPENMW_RESOURCES}
|
||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(openmw openmw-lib)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(openmw openmw-lib)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Sound stuff - here so CMake doesn't stupidly recompile EVERYTHING
|
# Sound stuff - here so CMake doesn't stupidly recompile EVERYTHING
|
||||||
|
Loading…
x
Reference in New Issue
Block a user