msys make for Android

Compilation and installation of DCMTK

Moderator: Moderator Team

Message
Author
GGK
Posts: 20
Joined: Mon, 2012-11-12, 14:49

Re: msys make for Android

#16 Post by GGK »

It seems to be unpossible...it's done...

* Using MSYS Makefiles instead of MinGW Makefiles
* change android.toolchain.make

Code: Select all

# linker flags
set( ANDROID_LINKER_FLAGS "-fPIE -pie" )
and

Code: Select all

set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fpic -fPIE -funwind-tables" )
* Android NDK: r10d
* Emulator: API 17
* ANDROID_NATIVE_API_LEVEL: 17

Thank you so much for your time and efforts!

GGK

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: msys make for Android

#17 Post by Jan Schlamelcher »

You're welcome ;-). In fact I am sorry that the tutorial still does not handle those pitfalls and Android support is still quite experimental. So thanks for the feedback, I'll put it on the list of things to integrate in the tutorial or perhaps even something like putting

Code: Select all

IF(CMAKE_GENERATOR MATCHES "MinGW Makefiles")
  MESSAGE(FATAL_ERROR "MinGW Makefiles are unsupported, please use MSYS Makefiles instead.")
ENDIF()
into the CMake scripts would be an idea to ease compiling for Android.

GGK
Posts: 20
Joined: Mon, 2012-11-12, 14:49

Re: msys make for Android

#18 Post by GGK »

Its a good feeling, to have a hand on the project DCMTK for android ;-)

perhaps a better solution could be

Code: Select all

IF(!CMAKE_GENERATOR MATCHES "MSYS Makefiles")
  MESSAGE(FATAL_ERROR "${CMAKE_GENERATOR MATCHES} is not unsupported, please use MSYS Makefiles instead.")
ENDIF()
Best regards...

GGK

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: msys make for Android

#19 Post by Jan Schlamelcher »

That won't do, as you will have to use "Unix Makefiles" when compiling under Linux (or Mac OS X I would guess). This Android stuff is a bit hard because you have to consider so many different platforms, NDK versions and target devices :(.
One could however do something like:

Code: Select all

IF(ANDROID)
  IF(WIN32)
    IF(NOT CMAKE_GENERATOR MATCHES "MSYS Makefiles")
      MESSAGE(FATAL_ERROR "${CMAKE_GENERATOR} is unsupported by the NDK, please use MSYS Makefiles instead.")
    ENDIF()
  ELSE()
    IF(NOT CMAKE_GENERATOR MATCHES "Unix Makefiles")
       MESSAGE(FATAL_ERROR "${CMAKE_GENERATOR} is unsupported by the NDK, please use Unix Makefiles instead.")
    ENDIF()
  ENDIF()
ENDIF()
But then most likely something will change in the future and we'll have to update this now rather complicated (in the sense of no loger straight forward) code and perhaps make it even more complicated :(. I'll see if I can figure something out.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest