Skip to content

Commit 3ac5ca9

Browse files
authored
Android用ビルド対応 (Synesthesias#145)
* first try * second try * simplify conditions for if * Update submodule
1 parent 72d08c5 commit 3ac5ca9

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

3rdparty/glTF-SDK/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
cmake_minimum_required(VERSION 3.5)
22
project (GLTFSDK)
33

4-
if(UNIX AND NOT APPLE)
4+
if( (UNIX AND NOT APPLE) AND (NOT ANDROID) )
55
link_libraries(stdc++fs)
66
endif()
77

8-
if(NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
8+
if( NOT(IOS OR ANDROID) )
99
option(ENABLE_UNIT_TESTS "ENABLE_UNIT_TESTS" ON)
1010
else()
1111
option(ENABLE_UNIT_TESTS "ENABLE_UNIT_TESTS" OFF)
@@ -16,7 +16,7 @@ endif()
1616

1717
# Disable the samples on macOS, iOS, and Android since the experimental features they use
1818
# do not yet build with XCode or clang on these platforms.
19-
if(APPLE OR ANDROID_OS_PLATFORM)
19+
if(APPLE OR ANDROID)
2020
option(ENABLE_SAMPLES "ENABLE_SAMPLES" OFF)
2121
else()
2222
option(ENABLE_SAMPLES "ENABLE_SAMPLES" ON)

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ endif()
6868
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
6969
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
7070

71-
if(NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
71+
if( NOT(IOS OR ANDROID) )
7272
## ユニットテスト
7373
add_subdirectory("test")
7474

@@ -95,7 +95,7 @@ set(LIBCITYGML_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libcitygml/sources/
9595
add_subdirectory("3rdparty/glTF-SDK")
9696
set(GLTFSDK_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/glTF-SDK/glTF-SDK/GLTFSDK/Inc")
9797

98-
if(NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
98+
if( NOT(IOS OR ANDROID) )
9999
# FBX SDK 以下のディレクトリで debug と release のどちらを利用するか決めます。
100100
# debug なら debug/*-md.lib を使い、release なら release/*-mt.lib を使います。
101101
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
@@ -180,7 +180,7 @@ add_subdirectory("3rdparty/openssl-cmake")
180180
# libplateau をビルドします。
181181
add_subdirectory("src")
182182

183-
if(NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
183+
if( NOT(IOS OR ANDROID) )
184184
## Examples
185185
add_subdirectory("examples/log_skipped_elements")
186186
add_subdirectory("examples/export_obj")
@@ -198,7 +198,7 @@ endif(BUILD_PYTHON)
198198
# Copy data for testing
199199
file(COPY data/ DESTINATION "${CMAKE_BINARY_DIR}/data")
200200

201-
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
201+
if(IOS)
202202
set_target_properties(ssl PROPERTIES
203203
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO"
204204
XCODE_ATTRIBUTE_ENABLE_BITCODE "NO"

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
add_compile_definitions(LIBPLATEAU_BUILD)
22

33
add_library(plateau SHARED "")
4-
if(NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
4+
if( NOT(IOS OR ANDROID) )
55
target_link_libraries(plateau PUBLIC citygml xerces-c GLTFSDK crypto ssl "${FBXSDK_LIBRARIES}" LibXml2 "${ZLIB_LIBRARY}" c_wrapper)
66
target_include_directories(plateau PUBLIC "${CMAKE_SOURCE_DIR}/include" "${LIBCITYGML_INCLUDE}" "${GLTFSDK_INCLUDE}" "${CPPHTTPLIB_INCLUDE}" "${FBXSDK_INCLUDE}")
77
else()

src/mesh_writer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
1+
if( IOS OR ANDROID)
22
target_sources(plateau PRIVATE
33
"obj_writer.cpp"
44
"gltf_writer.cpp"

0 commit comments

Comments
 (0)