add_subdirectory (fib-1.1)
if(NOT ANDROID)
+ set(NAVIT_START_SRC start.c)
if(WIN32 OR WINCE AND NOT WIN_OMIT_RESOURCES)
- add_executable (navit start.c ${CMAKE_CURRENT_SOURCE_DIR}/gui/win32/resources/resource.rc)
+ list(APPEND NAVIT_START_SRC ${CMAKE_CURRENT_SOURCE_DIR}/gui/win32/resources/resource.rc)
else()
if (APPLE)
- add_executable (navit MACOSX_BUNDLE start.c)
- else()
- add_executable (navit start.c)
+ set(NAVIT_START_SRC start_apple.m)
endif()
endif()
-
+ if (BUILD_BUNDLE)
+ list(APPEND NAVIT_START_SRC resources/share)
+ endif()
+ add_executable(navit ${NAVIT_START_SRC})
target_link_libraries (navit ${NAVIT_LIBNAME})
set_target_properties(navit PROPERTIES COMPILE_DEFINITIONS "MODULE=${MODULE_NAME}")
+ if (BUILD_BUNDLE)
+ add_custom_command(OUTPUT resources/share COMMAND mkdir -p resources/share)
+ set_source_files_properties(resources/share PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
+ set_target_properties(navit PROPERTIES MACOSX_BUNDLE TRUE)
+ add_dependencies(navit navit_config_xml_resource)
+ add_dependencies(navit images_resource)
+ endif()
endif()
if (SHARED_LIBNAVIT)
add_custom_target( navit_config_xml ALL DEPENDS navithdpi.xml navitmdpi.xml navitldpi.xml)
else()
process_xslt(${CMAKE_CURRENT_SOURCE_DIR}/navit_shipped.xml ${CMAKE_CURRENT_BINARY_DIR}/navit.xml "")
+ add_custom_target( navit_config_xml_resource DEPENDS navit.xml COMMAND mkdir -p resources/share/navit COMMAND cp navit.xml resources/share/navit)
add_custom_target( navit_config_xml ALL DEPENDS navit.xml)
endif()