diff options
Diffstat (limited to 'source/blender/makesrna/intern/CMakeLists.txt')
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 82c0757456d..373abc6f9f9 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -264,17 +264,33 @@ blender_include_dirs_sys( ${GLEW_INCLUDE_PATH} ) +if(WITH_ANDROID) +add_library(makesrna SHARED ${SRC} ${SRC_RNA_INC} ${SRC_DNA_INC} ) +else() add_executable(makesrna ${SRC} ${SRC_RNA_INC} ${SRC_DNA_INC}) +endif() target_link_libraries(makesrna bf_dna) target_link_libraries(makesrna bf_dna_blenlib) +target_link_libraries(makesrna ${PLATFORM_LINKLIBS}) # Output rna_*_gen.c # note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes +if(WITH_ANDROID) +add_custom_command( + OUTPUT ${GENSRC} + WORKING_DIRECTORY ${ANDROID_PROJ} + COMMAND ${ANDROID_PROJ}/makesrna.sh ${CMAKE_BINARY_DIR}/lib/libmakesrna.so ${CMAKE_CURRENT_BINARY_DIR}/ + DEPENDS makesrna +) + +else() add_custom_command( OUTPUT ${GENSRC} COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesrna ${CMAKE_CURRENT_BINARY_DIR}/ DEPENDS makesrna ) +endif() + # Build bf_rna set(SRC @@ -288,4 +304,6 @@ set(SRC rna_mesh_utils.h ) +add_definitions(-DGLEW_STATIC) + blender_add_lib(bf_rna "${SRC}" "${INC}" "${INC_SYS}") |