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 osg plugin couldn't load an osgb or i... first_gle General 2 Sat May 27, 2017 3:52 am View latest post
No new posts MFC mdi child windows show the scene ... rposg General 0 Fri May 26, 2017 6:37 pm View latest post
No new posts A problem with regard to std:istream ... first_gle General 2 Fri May 26, 2017 6:11 am View latest post
No new posts Crash on Windows 10 with a Display Li... efson General 2 Thu Apr 27, 2017 9:03 am View latest post
No new posts Building OSG for Android -- Windowing... bwhaines Build system [build] 4 Sun Apr 23, 2017 2:01 am 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