OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

bug: Android cross compile (windows) doesn't work with crystax 10.x NDK


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build]
View previous topic :: View next topic  
Author Message
remoe
User


Joined: 11 Jul 2011
Posts: 41

PostPosted: Sat Oct 29, 2016 7:51 pm    Post subject:
bug: Android cross compile (windows) doesn't work with crystax 10.x NDK
Reply with quote

Hi,

I've tried to build OSG on Android with crystax NDK. It doesn't build because of a parsing error on "android.toolchain.cmake"

It works after this changes:

Code:
if( ANDROID_NDK )
 get_filename_component( ANDROID_NDK "${ANDROID_NDK}" ABSOLUTE )
 set( ANDROID_NDK "${ANDROID_NDK}" CACHE INTERNAL "Path of the Android NDK" FORCE )
 set( BUILD_WITH_ANDROID_NDK True )
 if( EXISTS "${ANDROID_NDK}/RELEASE.TXT" )
  file( STRINGS "${ANDROID_NDK}/RELEASE.TXT" ANDROID_NDK_RELEASE_FULL LIMIT_COUNT 1 REGEX "-[0-9]+[a-z]?" )
  string( REGEX MATCH "-([0-9]+)([a-z]?)" ANDROID_NDK_RELEASE "${ANDROID_NDK_RELEASE_FULL}" )
 else()
  set( ANDROID_NDK_RELEASE "r1x" )
  set( ANDROID_NDK_RELEASE_FULL "unreleased" )
 endif()
 string( REGEX REPLACE "-([0-9]+)([a-z]?)" "\\1*1000" ANDROID_NDK_RELEASE_NUM "${ANDROID_NDK_RELEASE}" )
 string( FIND " abcdefghijklmnopqastuvwxyz" "${CMAKE_MATCH_2}" __ndkReleaseLetterNum )
 math( EXPR ANDROID_NDK_RELEASE_NUM "${ANDROID_NDK_RELEASE_NUM}+${__ndkReleaseLetterNum}" )
elseif( ANDROID_STANDALONE_TOOLCHAIN )


The "release.txt" looks like:

Code:
crystax-ndk-10.3.2 (64-bit)


I've replaced "r" with "-". This breaks other NDK release parsing. But someone who has wrote this cmake script can "merge" this changes.

Cheers,
Remo
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts OpenSceneGraph static linking for And... tanshihaj Build system [build] 1 Thu Sep 21, 2017 12:56 pm View latest post
No new posts Qt Quick and Android tanshihaj General 4 Tue Sep 19, 2017 2:28 pm View latest post
No new posts Does OSG work on Mac OS? robertosfield General 9 Mon Sep 18, 2017 9:48 am View latest post
No new posts Faster framerate under Windows debugger? Chris Hanson General 1 Fri Sep 08, 2017 3:52 pm View latest post
No new posts Compile error with Visual Studio 2017 draccagni General 2 Sat Aug 19, 2017 1:52 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP