diff options
author | rikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-01-13 22:19:42 +0000 |
---|---|---|
committer | rikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-01-13 22:19:42 +0000 |
commit | 891e17d811248c17d00a22772b6267cb73780ad2 (patch) | |
tree | 3cdc1856be4b606ebc10663b2325f6df06841ba8 /cmake | |
parent | f484cef5f152fb969fc40079e9098bbb1c1e4fe3 (diff) | |
download | navit-891e17d811248c17d00a22772b6267cb73780ad2.tar.gz |
Add:Build/cmake:Added Android build support
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3915 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/copy_files.cmake | 15 | ||||
-rw-r--r-- | cmake/navit_macros.cmake | 13 |
2 files changed, 25 insertions, 3 deletions
diff --git a/cmake/copy_files.cmake b/cmake/copy_files.cmake new file mode 100644 index 000000000..c5dc8b565 --- /dev/null +++ b/cmake/copy_files.cmake @@ -0,0 +1,15 @@ +message("Copy '${GLOB_EXP}' to '${DST}'") + +file(GLOB SRC_FILES ${GLOB_EXP}) + +if ( SRC_FILES ) + if ( LOWER ) + foreach (FILE ${SRC_FILES}) + get_filename_component(FILEN_NAME ${FILE} NAME) + string(TOLOWER ${FILEN_NAME} FILEN_NAME_LOWER) + execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FILE} ${DST}/${FILEN_NAME_LOWER}) + endforeach() + else() + file(COPY ${SRC_FILES} DESTINATION ${DST}) + endif( LOWER ) +endif() diff --git a/cmake/navit_macros.cmake b/cmake/navit_macros.cmake index 438b288d1..5c40eaaa2 100644 --- a/cmake/navit_macros.cmake +++ b/cmake/navit_macros.cmake @@ -34,14 +34,16 @@ macro(module_add_library MODULE_NAME ) add_library(${MODULE_NAME} ${MODULE_BUILD_TYPE} ${ARGN}) SET_TARGET_PROPERTIES(${MODULE_NAME} PROPERTIES COMPILE_DEFINITIONS "MODULE=${MODULE_NAME}") TARGET_LINK_LIBRARIES(${MODULE_NAME} ${${MODULE_NAME}_LIBS}) + SET_TARGET_PROPERTIES( ${MODULE_NAME} PROPERTIES COMPILE_FLAGS "${NAVIT_COMPILE_FLAGS}") if (USE_PLUGINS) - SET_TARGET_PROPERTIES( ${MODULE_NAME} PROPERTIES COMPILE_FLAGS ${NAVIT_COMPILE_FLAGS}) # workaround to be compatible with old paths set_target_properties( ${MODULE_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.libs") -# TARGET_LINK_LIBRARIES(${MODULE_NAME} navit_core) + if (ANDROID) + TARGET_LINK_LIBRARIES(${MODULE_NAME} navit) + endif() install(TARGETS ${MODULE_NAME} DESTINATION ${LIB_DIR}/navit/${${MODULE_NAME}_TYPE} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) @@ -50,8 +52,13 @@ endmacro(module_add_library) macro(supportlib_add_library LIB_NAME ) add_library(${LIB_NAME} ${ARGN}) + SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES COMPILE_FLAGS "${NAVIT_COMPILE_FLAGS}") if (USE_PLUGINS) - SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES COMPILE_FLAGS ${NAVIT_COMPILE_FLAGS}) TARGET_LINK_LIBRARIES(${MODULE_NAME} navit_core) endif() endmacro(supportlib_add_library) + +macro(message_error) + set(NAVIT_DEPENDENCY_ERROR 1) + message( SEND_ERROR ${ARGN}) +endmacro(message_error) |