Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS build #1124

Open
wants to merge 170 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
995fc19
Add files via upload
OLFDB Feb 20, 2019
644fc22
Add:gui/internal
OLFDB Feb 21, 2019
f277c49
Indent
OLFDB Feb 21, 2019
f0c7fd7
Indent
OLFDB Feb 21, 2019
38fe29f
Add files via upload
OLFDB Feb 21, 2019
f666165
Indent
OLFDB Feb 21, 2019
4862370
Indent
OLFDB Feb 21, 2019
5de0b44
Indent
OLFDB Feb 21, 2019
3459120
Indent
OLFDB Feb 21, 2019
e881f47
FIX:DTD <navit> to not show errors in XML editors
OLFDB Feb 23, 2019
495b4cf
Merge pull request #1 from navit-gps/trunk
OLFDB Feb 24, 2019
50eb35e
FIX: Removed duplicate comma
OLFDB Feb 24, 2019
43c649d
FIX:WIN32 build with gtk_drawing_area
OLFDB Feb 26, 2019
e9fb7a2
FIX:undefined symbol errors for cairo
OLFDB Feb 26, 2019
0f4282f
FIX:Undo changes
OLFDB Feb 27, 2019
6b84e47
FIX:Use cairo instead of pangocairo
OLFDB Feb 27, 2019
9563675
Feature: Support USERPROFILE folder for Windows
OLFDB Mar 1, 2019
1c0274a
Merge pull request #2 from navit-gps/trunk
OLFDB Mar 3, 2019
d3ad426
Indent
OLFDB Mar 3, 2019
60e98a2
indent
OLFDB Mar 3, 2019
a1d6038
indent
OLFDB Mar 3, 2019
400ea1b
indent
OLFDB Mar 3, 2019
0f15a21
indent
OLFDB Mar 3, 2019
207ea59
indent
OLFDB Mar 3, 2019
4365ed2
Rework:USERPROFILE for Windows
OLFDB Mar 5, 2019
5d2b87f
FIX:build for macos
OLFDB Mar 12, 2019
503d1c3
Merge pull request #3 from navit-gps/trunk
OLFDB Mar 18, 2019
d206aad
Merge pull request #4 from navit-gps/trunk
OLFDB Apr 4, 2019
78c3cd8
FIX:Conditional apple build
OLFDB Apr 12, 2019
985fa38
FIX:typo
OLFDB Apr 12, 2019
6444f38
Using HAVE_API_WIN32 instead of HAVE_API_WIN32_BASE (Both WinCE and W…
lains Apr 29, 2019
9b40328
Update config.yml
OLFDB Jul 6, 2019
399985a
Revert "Update config.yml"
OLFDB Jul 7, 2019
ba98bee
Revert "Update config.yml"
OLFDB Jul 7, 2019
68f3dd8
Merge branch 'trunk' of https://github.com/OLFDB/navit into trunk
OLFDB Jul 7, 2019
5e76e7d
Revert "FIX:Use cairo instead of pangocairo"
OLFDB Jul 7, 2019
b0c2a83
revert changes
OLFDB Jul 7, 2019
17ecfcd
repair
Jul 7, 2019
b2de863
Revert "FIX: Removed duplicate comma"
Jul 7, 2019
907c5fb
Revert "FIX:DTD <navit> to not show errors in XML editors"
Jul 7, 2019
76cbd23
Revert "FIX:WIN32 build with gtk_drawing_area"
Jul 7, 2019
67961fe
Disable sanity check for permanentrestrictions folder
OLFDB Jul 27, 2019
9c5a187
Merge branch 'trunk' into trunk
pgrandin Aug 16, 2019
540d93a
Merge remote-tracking branch 'upstream/trunk' into trunk
Sep 25, 2019
b41d652
Minor revert on blank line
Sep 25, 2019
d670c8c
Update update_download_center.sh
OLFDB Mar 5, 2021
e34ee3b
Update config.yml
OLFDB Mar 5, 2021
ae8e847
Update ci_sanity_checks.sh
OLFDB Apr 3, 2021
7775f77
Merge pull request #10 from navit-gps/trunk
OLFDB Apr 3, 2021
71493b4
Update osm.c
OLFDB Apr 3, 2021
12c9200
Update osm.c
OLFDB Apr 3, 2021
c3c8c5a
Disable debug output
OLFDB Apr 3, 2021
fc9a672
Update navit_shipped.xml
OLFDB Apr 3, 2021
6af3dbc
Merge branch 'trunk' into trucknavigation
OLFDB Apr 3, 2021
baeef1c
Update osm.c
OLFDB Apr 3, 2021
3a397da
Update osm.c
OLFDB Apr 3, 2021
9fc0e74
Add boundary=low_emission_zone to binfile map.
metalstrolch Apr 3, 2021
3998c8d
Update osm.c
OLFDB Apr 3, 2021
e9b933e
Merge branch 'trunk' into trucknavigation
OLFDB Apr 3, 2021
f6a1771
Fix multi polygon detection
metalstrolch Apr 3, 2021
2f251b2
Update navit_layout_car_shipped.xml
OLFDB Apr 4, 2021
e98b308
Update osm.c
OLFDB Apr 4, 2021
f00c2f8
Update osm_xml.c
OLFDB Apr 4, 2021
f1a2d28
Update osm.c
OLFDB Apr 4, 2021
6e109d2
Update navit_layout_car_dark_shipped.xml
OLFDB Apr 4, 2021
a95c73b
enhanced conversion functions
OLFDB Apr 4, 2021
8a87709
Merge branch 'trucknavigation' of https://github.com/OLFDB/navit into…
OLFDB Apr 4, 2021
6dd140a
handle onditional speed limits
OLFDB Apr 10, 2021
d8bb86c
gui internal to change vehicle dimensions. Store dimensions in XML fi…
OLFDB Apr 24, 2021
3971819
Merge branch 'trunk' into trucknavigation
OLFDB Apr 24, 2021
5222500
Merge branch 'trunk' into trucknavigation
OLFDB Apr 25, 2021
67a33a2
Merge pull request #11 from OLFDB/trucknavigation
OLFDB Apr 26, 2021
9e3e9fc
Added demo vehicle
OLFDB May 29, 2021
019ec0e
Request location authorization from the user on request
OLFDB May 29, 2021
5785ff0
Handle location authorization requests, applied astyle
OLFDB May 29, 2021
fdc4363
Handle location authorization requests, applied astyle
OLFDB May 29, 2021
fa3130b
Fix iOS build
OLFDB May 29, 2021
e1808a2
Fix iOS build, astyle applied
OLFDB May 29, 2021
14e0a06
Fixed iOS build
OLFDB May 29, 2021
2e01498
Fixed iOS build
OLFDB May 29, 2021
3de6a8a
Fixed iOS build
OLFDB May 29, 2021
c90a03e
Fixed iOS build
OLFDB May 29, 2021
e5fa578
Fixed iOS build
OLFDB May 29, 2021
88f9c72
Fixed iOS build, astyle applied
OLFDB May 29, 2021
cc321f0
Fixed iOS build, astyle applied
OLFDB May 29, 2021
d7d34a0
Added implementation, astyle applied
OLFDB May 29, 2021
569f3a7
Added attr_vehicle_request_location_authorization to be able to reque…
OLFDB May 29, 2021
aeb2435
Fix for iOS build, astyle applied
OLFDB May 29, 2021
646ccb1
Fixes for iOS build, astyle applied
OLFDB May 29, 2021
310da33
Fixes for iOS build, astyle applied
OLFDB May 29, 2021
ea0e08b
Fixes for iOS build, astyle applied
OLFDB May 29, 2021
2f45274
Added attr_vehicle_request_location_authorization to be able to reque…
OLFDB May 29, 2021
dc00070
Fixes for iOS build, astyle applied
OLFDB May 29, 2021
bf5f51f
New iOS build cmake file
OLFDB May 29, 2021
5e0c9f6
Added VSSpeechSynthesizer.m to module
OLFDB May 29, 2021
e91a350
Fixed iOS build
OLFDB May 29, 2021
5ca4413
Fixed iOS build
OLFDB May 29, 2021
9d691d8
astyle applied
OLFDB May 29, 2021
25c7378
Log disabled
OLFDB May 29, 2021
bb3dbfb
Discard attr_vehicle_request_location_authorization with no error
OLFDB May 29, 2021
d877d1c
Added NSLocationWhenInUseUsageDescription key
OLFDB May 29, 2021
3c08b42
Log disabled
OLFDB May 29, 2021
7515cb1
Repair the mess atype created...
OLFDB May 29, 2021
f49ae2f
Removed variable
OLFDB May 29, 2021
78970d6
Merge branch 'ios' of https://github.com/OLFDB/navit into HEAD
OLFDB May 29, 2021
a8c2b47
Repair the mess atype created...
OLFDB May 29, 2021
a78ccd1
Fixes after review
OLFDB May 30, 2021
bbd1319
Fixes after review
OLFDB May 30, 2021
b873491
Fixes after review
OLFDB May 30, 2021
325645c
Fixes after review
OLFDB May 30, 2021
fe4513c
Fixes after review
OLFDB May 30, 2021
3e6d0d5
Allow architecture to be set via -DIOS_ARCH= in commandline
OLFDB May 30, 2021
f9266df
Changes after review, iPad support
OLFDB May 30, 2021
24970c7
handle asset catalag
OLFDB Jun 6, 2021
c442d98
use of simulator
OLFDB Jun 6, 2021
101ba49
use of asset catalog, do not crop Default.png and Icon.png
OLFDB Jun 6, 2021
b53c474
Guide to build with Xcode for iOS
OLFDB Jun 6, 2021
b814bf7
use LaunchScreen, no status bar, supported orientations, CFBundleVers…
OLFDB Jun 6, 2021
db0beea
Changes after review
OLFDB Jun 6, 2021
b4770d0
not needed
OLFDB Jun 6, 2021
7bca23a
astyle
OLFDB Jun 6, 2021
4087bc2
astyle
OLFDB Jun 6, 2021
6cc9d0a
Fixed CoreText library linker directive
OLFDB Jun 6, 2021
f655c6a
changes to prevent include of gthreadprivate.h in start_real.c
OLFDB Jun 7, 2021
d88e977
generated icons, debug entries to find root cause for symbols not found
OLFDB Jun 10, 2021
38a43bb
sanity check issue
OLFDB Jun 10, 2021
8fc1a9a
Policy issue
OLFDB Jun 10, 2021
8e5b1c8
Improved speech for iPhone
OLFDB Jun 12, 2021
fe2fc27
Changes after review
OLFDB Jun 12, 2021
d2e539e
Improved rotation
OLFDB Jun 12, 2021
389d47b
astyle
OLFDB Jun 12, 2021
a05cb7e
adress warnings
OLFDB Jun 12, 2021
99d1d1a
pad, pinch, tap support
OLFDB Jun 18, 2021
1a2dcb8
Merge branch 'trunk' into ios
jkoan Jun 22, 2021
2d851ba
Rendering issues fixed
OLFDB Jun 26, 2021
e4d7c5a
Merge branch 'ios' of https://github.com/OLFDB/navit into ios
OLFDB Jun 26, 2021
e3056a1
astyle
OLFDB Jun 26, 2021
c3f5510
addressed a warning, removed a debug message
OLFDB Jun 27, 2021
3b7ae06
Changes for icon creation, added textures to bundle
OLFDB Jun 27, 2021
961daab
macos compatibility
OLFDB Jun 27, 2021
1ac3c9a
macos compatibility
OLFDB Jun 27, 2021
ccd49b8
add icons for ad-hoc deployment
OLFDB Jun 27, 2021
52fd7ee
astyle
OLFDB Jun 27, 2021
5fe2256
set iOS version for any build target
OLFDB Jul 26, 2021
fa9fa38
background processing, versioning, license text
OLFDB Jul 26, 2021
3c43196
display menu while in background, do not draw polygons with count of …
OLFDB Jul 26, 2021
0384757
maptool on macos
OLFDB Jul 26, 2021
a4a2f36
moved vehicle_request_location_authorization, added vehicle_is_select…
OLFDB Jul 26, 2021
abafe62
mark vehicle active/inactive when changing vehicles, added navit_stor…
OLFDB Jul 26, 2021
d2a1bd5
added prototype for navit_store_center(struct navit * this_)
OLFDB Jul 26, 2021
0c7d095
added prototype for (void)setHFPDelay:(double) delay
OLFDB Jul 26, 2021
8fc8d76
use a delay instead of silent annoucement for HFP connection establis…
OLFDB Jul 26, 2021
41ea250
setHFPdelay added
OLFDB Jul 26, 2021
6c23a7c
handle language="de"
OLFDB Jul 26, 2021
71a72c4
addressed an Xcode warning
OLFDB Jul 26, 2021
10ac9c6
support for attribute vehicle_is_selected
OLFDB Jul 26, 2021
50f9693
support for attribute vehicle_is_selected
OLFDB Jul 26, 2021
d9989cd
support background activity
OLFDB Jul 26, 2021
7ba5d8e
support position_valid attribute
OLFDB Jul 26, 2021
77e4f23
support new build system for Xcode, create launch images for iOS
OLFDB Jul 26, 2021
3aa2e2a
use git version for iOS only
OLFDB Jul 27, 2021
d24af52
Merge branch 'trunk' into ios
OLFDB Sep 19, 2021
c572c4f
merge trunk
OLFDB Oct 9, 2021
3b8f8a3
Merge branch 'navit-gps-trunk' into trunk
OLFDB Oct 9, 2021
1da3ccb
Merge pull request #14 from navit-gps/trunk
OLFDB Oct 9, 2021
4c69b68
merged trunk
OLFDB Mar 20, 2022
5d4bf2a
merge trunk
OLFDB Mar 20, 2022
4591018
Merge branch 'navit-gps-trunk' into trunk
OLFDB Mar 20, 2022
5973dc5
Merge branch 'ios' into trunk
OLFDB Mar 20, 2022
7acf706
Merge pull request #17 from OLFDB/trunk
OLFDB Mar 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ jobs:
command: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
- add_ssh_keys:
fingerprints:
- "58:42:73:90:cc:68:f7:34:7e:37:37:fa:b3:26:1f:a5"
- "58:56:ba:cb:79:65:53:bc:9e:41:a2:fd:18:59:43:a2"
- run:
name: Update results to Github
command: export GIT_TERMINAL_PROMPT=0 && git push origin $CIRCLE_SHA1:refs/heads/master
Expand Down
128 changes: 114 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
cmake_minimum_required(VERSION 3.2)

set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.navitproject.navit")
set(MACOSX_BUNDLE_BUNDLE_NAME "Navit")
set(MACOSX_BUNDLE_BUNDLE_NAME "navit")
set(PRODUCT_BUNDLE_IDENTIFIER ${MACOSX_BUNDLE_GUI_IDENTIFIER})
if(USE_UIKIT)
execute_process(COMMAND git describe --tags OUTPUT_VARIABLE GIT_VERSION)
string(STRIP ${GIT_VERSION} GIT_VERSION)
endif(USE_UIKIT)
message(STATUS "Building with CMake V${CMAKE_VERSION}")
message(STATUS "GIT_VERSION is \"${GIT_VERSION}\"")

if (DISABLE_CXX)
project(navit C)
else(DISABLE_CXX)
project(navit C CXX)
endif(DISABLE_CXX)

if(USE_UIKIT)
# Set the find root to the iOS developer roots
set (CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT}/ ${CMAKE_IOS_SDK_ROOT}/ ${CMAKE_FIND_ROOT_PATH} CACHE STRING "iOS find search path root")
endif(USE_UIKIT)

# Workaround for CMake issue 8345 / 9220, see http://trac.navit-project.org/ticket/1041
if(DEFINED CMAKE_CXX_COMPILER AND CMAKE_CXX_COMPILER MATCHES "^$")
set(CMAKE_CXX_COMPILER CMAKE_CXX_COMPILER-NOTFOUND)
Expand All @@ -20,6 +31,7 @@ endif(NOT DISABLE_CXX)
set(NAVIT_VERSION_MAJOR "0")
set(NAVIT_VERSION_MINOR "5")
set(NAVIT_VERSION_PATCH "6")

if(ANDROID)
set(PACKAGE_VERSION "${NAVIT_VERSION_MAJOR}.${NAVIT_VERSION_MINOR}.${NAVIT_VERSION_PATCH}.${ANDROID_ABI}")
else(ANDROID)
Expand Down Expand Up @@ -263,11 +275,17 @@ if (NOT DISABLE_QT)
endif (NOT DISABLE_QT)

#Simple checks
CHECK_INCLUDE_FILES(wordexp.h HAVE_WORDEXP)
if(NOT USE_UIKIT) # Will be found but is not usable:
# int wordexp(const char * __restrict, wordexp_t * __restrict, int) __OSX_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA);
# void wordfree(wordexp_t *) __OSX_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA);
CHECK_INCLUDE_FILES(wordexp.h HAVE_WORDEXP)
endif(NOT USE_UIKIT)
CHECK_INCLUDE_FILES(endian.h HAVE_ENDIAN_H)
CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)
CHECK_INCLUDE_FILES(byteswap.h HAVE_BYTESWAP_H)
CHECK_LIBRARY_EXISTS(gypsy gypsy_control_get_default "" GYPSY_FOUND)
if(NOT USE_UIKIT)
CHECK_LIBRARY_EXISTS(gypsy gypsy_control_get_default "" GYPSY_FOUND)
endif(NOT USE_UIKIT)
CHECK_INCLUDE_FILES(libspeechd.h HAVE_LIBSPEECHD)
CHECK_INCLUDE_FILES(sys/socket.h HAVE_SOCKET)
CHECK_INCLUDE_FILES(sys/shm.h HAVE_SHMEM)
Expand All @@ -283,6 +301,7 @@ CHECK_INCLUDE_FILES(libintl.h HAVE_LIBINTL)
CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILES(getopt.h HAVE_GETOPT_H)
CHECK_INCLUDE_FILES(string.h HAVE_STRING_H)
CHECK_INCLUDE_FILES(stdlib.h HAVE_STDLIB_H)
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
CHECK_SYMBOL_EXISTS(system stdlib.h HAVE_SYSTEM)
CHECK_SYMBOL_EXISTS(CreateProcess windows.h HAVE_CREATEPROCESS)
Expand Down Expand Up @@ -509,6 +528,14 @@ if (GETTEXT_FOUND)
set_with_reason(USE_NATIVE_LANGUAGE_SUPPORT "Gettext found" TRUE)
endif(GETTEXT_FOUND)

if (USE_UIKIT)
set_with_reason(USE_NATIVE_LANGUAGE_SUPPORT "IOS found" TRUE)
set(XGETTEXT "/usr/local/bin/xgettext")
set(GETTEXT_MSGMERGE_EXECUTABLE "/usr/local/bin/msgmerge")
set(GETTEXT_MSGFMT_EXECUTABLE "/usr/local/bin/msgfmt")
add_compile_definitions(IOS )
endif(USE_UIKIT)

#Independent modules
add_module(graphics/null "Default" TRUE)
add_module(osd/core "Default" TRUE)
Expand Down Expand Up @@ -593,7 +620,11 @@ add_feature(BUILD_MAPTOOL "default" TRUE)
add_feature(XSL_PROCESSING "default" TRUE)

set(SUPPORTED_XSLT_PROCESSORS "saxonb-xslt;saxon;saxon8;saxon-xslt;xsltproc;transform.exe")
find_program(XSLT_PROCESSOR NAMES ${SUPPORTED_XSLT_PROCESSORS})
if (USE_UIKIT)
find_host_program(XSLT_PROCESSOR NAMES ${SUPPORTED_XSLT_PROCESSORS})
else (USE_UIKIT)
find_program(XSLT_PROCESSOR NAMES ${SUPPORTED_XSLT_PROCESSORS})
endif (USE_UIKIT)
if(XSLT_PROCESSOR)
message(STATUS "Found XSLT processor: ${XSLT_PROCESSOR}")
execute_process(COMMAND ${XSLT_PROCESSOR} -snone ${CMAKE_CURRENT_SOURCE_DIR}/cmake/test.xml ${CMAKE_CURRENT_SOURCE_DIR}/cmake/test.xslt
Expand Down Expand Up @@ -707,18 +738,22 @@ endif()
if (APPLE OR USE_UIKIT)
set_with_reason(vehicle/iphone "apple detected" TRUE)
set_with_reason(graphics/cocoa "apple detected" TRUE)
if (EXISTS "${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks/VoiceServices.framework")
if (USE_UIKIT)
set_with_reason(speech/iphone "apple detected" TRUE)
endif()
endif(USE_UIKIT)
set(BUILD_BUNDLE TRUE CACHE BOOLEAN "build an osx bundle")
endif()
endif(APPLE OR USE_UIKIT)

if(CMAKE_SIZEOF_VOID_P LESS 8)
set_with_reason(BUILD_MAPTOOL "maptool works only on 64 bit architectures" FALSE)
endif()

if(BUILD_MAPTOOL)
find_package(Protobuf-c REQUIRED)
if(USE_UIKIT)
find_host_package(Protobuf-c REQUIRED)
else(USE_UIKIT)
find_package(Protobuf-c REQUIRED)
endif(USE_UIKIT)
if(NOT PROTOBUF_C_FOUND)
set_with_reason(BUILD_MAPTOOL "PROTOBUF-C not found" FALSE)
endif()
Expand Down Expand Up @@ -781,7 +816,11 @@ if(FREETYPE_FOUND AND NOT FONTCONFIG_FOUND)
endif()

# Image conversion
find_program(IMAGE_CONVERTER NAMES convert)
if (USE_UIKIT)
find_host_program(IMAGE_CONVERTER NAMES rsvg-convert)
else (USE_UIKIT)
find_program(IMAGE_CONVERTER NAMES convert)
endif (USE_UIKIT)
execute_process(COMMAND ${IMAGE_CONVERTER} -list format OUTPUT_VARIABLE CONVERT_FORMATS)
if(CONVERT_FORMATS MATCHES ".*XPM[ *][ ]*XPM[ ]*r[w-].*")
set(IMAGE_CONVERTER_XPM ${IMAGE_CONVERTER})
Expand All @@ -792,7 +831,11 @@ if (SVG2PNG)
if (NOT IMAGE_CONVERTER_SVGZ)
set (SVG_CONVERTER_PROGS rsvg-convert ksvgtopng ksvgtopng4 inkscape)
set (CMAKE_FIND_APPBUNDLE "NEVER")
find_program(IMAGE_CONVERTER_SVGZ NAMES ${SVG_CONVERTER_PROGS} PATHS /Applications/Inkscape.app/Contents/Resources/bin)
if (USE_UIKIT)
find_host_program(IMAGE_CONVERTER_SVGZ NAMES ${SVG_CONVERTER_PROGS})
else (USE_UIKIT)
find_program(IMAGE_CONVERTER_SVGZ NAMES ${SVG_CONVERTER_PROGS} PATHS /Applications/Inkscape.app/Contents/Resources/bin)
endif (USE_UIKIT)
if (NOT IMAGE_CONVERTER_SVGZ)
if(CONVERT_FORMATS MATCHES ".*[ ]*SVG[ ]*r[w-].*")
set(IMAGE_CONVERTER_SVGZ ${IMAGE_CONVERTER})
Expand Down Expand Up @@ -835,11 +878,18 @@ CHECK_INCLUDE_FILES ("sys/param.h;sys/mount.h" HAVE_SYS_MOUNT_H)
CHECK_INCLUDE_FILES (unistd.h HAVE_UNISTD_H)
CHECK_FUNCTION_EXISTS (getcwd HAVE_GETCWD)
CHECK_FUNCTION_EXISTS (memalign HAVE_MEMALIGN)
if(USE_UIKIT)
if(HAVE_MEMALIGN)
add_compile_definitions(POSIX_MEMALIGN_WITH_COMPLIANT_ALLOCS)
endif(HAVE_MEMALIGN)
endif(USE_UIKIT)
CHECK_FUNCTION_EXISTS (valloc HAVE_VALLOC)
CHECK_FUNCTION_EXISTS (posix_memalign HAVE_POSIX_MEMALIGN)
CHECK_FUNCTION_EXISTS (popen HAVE_POPEN)
CHECK_FUNCTION_EXISTS (_atoi64 HAVE__ATOI64)

if(NOT USE_UIKIT) #check_function_exists()`` only verifies linking, it does not verify
# that the function is declared in system headers.
CHECK_FUNCTION_EXISTS (_atoi64 HAVE__ATOI64)
endif(NOT USE_UIKIT)
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/config.h" )

Expand All @@ -854,7 +904,7 @@ add_compiler_flag_if_available("-Wall")
add_compiler_flag_if_available("-Wno-unused-parameter")
add_compiler_flag_if_available("-Wno-sign-compare")
add_compiler_flag_if_available("-Wno-missing-field-initializers")
add_compiler_flag_if_available("-Wundef")
#add_compiler_flag_if_available("-Wundef")
add_compiler_flag_if_available("-Wcast-align")
add_compiler_flag_if_available("-Wpointer-arith")
add_compiler_flag_if_available("-Wextra")
Expand Down Expand Up @@ -928,3 +978,53 @@ add_subdirectory (man)
if (USE_NATIVE_LANGUAGE_SUPPORT)
add_subdirectory (po)
endif(USE_NATIVE_LANGUAGE_SUPPORT)

if (APPLE)
if(USE_UIKIT)
set_target_properties(${TARGET} PROPERTIES XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME "Launchicon")
set_target_properties(${TARGET} PROPERTIES XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2 ")
set_xcode_property(navit UIRequiresFullScreen "YES")
set_xcode_property(navit PRODUCT_BUNDLE_IDENTIFIER ${MACOSX_BUNDLE_GUI_IDENTIFIER})
endif(USE_UIKIT)
SET_XCODE_PROPERTY(navit CODE_SIGN_IDENTITY ${CODE_SIGN_IDENTITY} )
message(STATUS "CODE_SIGN_IDENTITY: ${CODE_SIGN_IDENTITY}")
SET_XCODE_PROPERTY(navit DEVELOPMENT_TEAM ${DEVELOPMENT_TEAM_ID} )
message(STATUS "DEVELOPMENT_TEAM_ID: ${DEVELOPMENT_TEAM_ID}")
endif (APPLE)

function(get_all_targets var)
set(targets)
get_all_targets_recursive(targets ${CMAKE_CURRENT_SOURCE_DIR})
set(${var} ${targets} PARENT_SCOPE)
endfunction()

macro(get_all_targets_recursive targets dir)
get_property(subdirectories DIRECTORY ${dir} PROPERTY SUBDIRECTORIES)
foreach(subdir ${subdirectories})
get_all_targets_recursive(${targets} ${subdir})
endforeach()

get_property(current_targets DIRECTORY ${dir} PROPERTY BUILDSYSTEM_TARGETS)
list(APPEND ${targets} ${current_targets})
endmacro()

get_all_targets(all_targets)
foreach (MYTARGET ${all_targets})
if(DEFINED IPHONEOS_DEPLOYMENT_TARGET)
set_target_properties(${MYTARGET} PROPERTIES XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "${IPHONEOS_DEPLOYMENT_TARGET}")
set_target_properties(${MYTARGET} PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_WEAK "YES")
endif(DEFINED IPHONEOS_DEPLOYMENT_TARGET)
endforeach()

macro(print_all_variables)
message(STATUS "print_all_variables------------------------------------------{")
get_cmake_property(_variableNames VARIABLES)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
message(STATUS "print_all_variables------------------------------------------}")
endmacro()

# Useful for debugging the cmake scripts
# print_all_variables()
Loading