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: 39

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 Building OSG for Android -- Windowing... bwhaines Build system [build] 0 Sun Apr 23, 2017 2:01 am View latest post
No new posts Support for Windows Universal Platform tomhog General 3 Fri Apr 21, 2017 11:07 pm View latest post
No new posts OSG 3.5.1 doesn't support GL3... 来恩 General 0 Sat Apr 15, 2017 7:54 am View latest post
No new posts OSG 3.5.1 doesn't support GL3 well 来恩 General 0 Sat Apr 15, 2017 7:27 am View latest post
No new posts Cross-platform guide for Linux, macOS... kornerr Announcement [ANN] 3 Mon Apr 03, 2017 5:05 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