Skip to content
Snippets Groups Projects
Commit 81b6dee0 authored by Maxime Graulich's avatar Maxime Graulich
Browse files

move BUILD_ANDROID with other targets

parent 9c26489b
No related branches found
No related tags found
No related merge requests found
...@@ -506,19 +506,6 @@ if(ENABLE_BUILD_IOS) ...@@ -506,19 +506,6 @@ if(ENABLE_BUILD_IOS)
endif(NOT CMAKE_TOOLCHAIN_FILE) endif(NOT CMAKE_TOOLCHAIN_FILE)
endif(ENABLE_BUILD_IOS) endif(ENABLE_BUILD_IOS)
if(ENABLE_BUILD_ANDROID)
find_file(CMAKE_TOOLCHAIN_FILE "android.toolchain.cmake")
if(NOT CMAKE_TOOLCHAIN_FILE)
message(FATAL_ERROR "Cannot compile Gmsh for android without android-cmake")
endif(NOT CMAKE_TOOLCHAIN_FILE)
set(CMAKE_BUILD_TYPE Release)
set(LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_CURRENT_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/libs/)
add_library(androidGmsh SHARED ${GMSH_SRC})
set_target_properties(androidGmsh PROPERTIES OUTPUT_NAME Gmsh)
target_link_libraries(androidGmsh ${EXTERNAL_LIBRARIES})
endif(ENABLE_BUILD_ANDROID)
if(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS) if(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS)
if(NOT HAVE_MESH OR NOT HAVE_POST OR NOT HAVE_PLUGINS OR NOT HAVE_ONELAB) if(NOT HAVE_MESH OR NOT HAVE_POST OR NOT HAVE_PLUGINS OR NOT HAVE_ONELAB)
message(SEND_ERROR "Cannot compile GUI without Mesh, Post, Plugin and ONELAB") message(SEND_ERROR "Cannot compile GUI without Mesh, Post, Plugin and ONELAB")
...@@ -1290,6 +1277,20 @@ if(ENABLE_BUILD_LIB) ...@@ -1290,6 +1277,20 @@ if(ENABLE_BUILD_LIB)
endif(MSVC) endif(MSVC)
endif(ENABLE_BUILD_LIB) endif(ENABLE_BUILD_LIB)
if(ENABLE_BUILD_ANDROID)
find_file(CMAKE_TOOLCHAIN_FILE "android.toolchain.cmake")
if(NOT CMAKE_TOOLCHAIN_FILE)
message(FATAL_ERROR "Cannot compile Gmsh for android without android-cmake")
endif(NOT CMAKE_TOOLCHAIN_FILE)
set(CMAKE_BUILD_TYPE Release)
set(LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_CURRENT_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/libs/)
add_definitions(-DBUILD_ANDROID)
add_library(androidGmsh SHARED ${GMSH_SRC})
set_target_properties(androidGmsh PROPERTIES OUTPUT_NAME Gmsh)
target_link_libraries(androidGmsh ${EXTERNAL_LIBRARIES})
endif(ENABLE_BUILD_ANDROID)
# shared library target # shared library target
if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC OR if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC OR
ENABLE_WRAP_PYTHON OR ENABLE_WRAP_JAVA) ENABLE_WRAP_PYTHON OR ENABLE_WRAP_JAVA)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment