I'm trying to build dcmtk on Android but i'm stuck. I downloaded dcmtk-3.6.1_20150217.tar.gz from snapshots and follow instructions from wiki. I tried on both Windows 8.1 and Ubuntu 14.10 with SDK 19, NDK r10d, Cmake 3.2.2.
First error was "string sub-command REGEX, mode MATCHALL needs at least 5 arguments total to" on android.toolchain.cmake:148, i tried changing this section with;
Code: Select all
#STRING(REGEX MATCHALL "Name:[ \t]*[^\r\n]*" ANDROID_AVAILABLE_AVDS ${OUTPUT})
#STRING(REGEX REPLACE "Name:[ \t]*([^\r\n;]*)" "\\1" ANDROID_AVAILABLE_AVDS "${ANDROID_AVAILABLE_AVDS}")
#SET(ANDROID_EMULATOR_AVD "${ANDROID_EMULATOR_AVD}" CACHE STRING "Android emulator Android Virtual Device (AVD) configuration" FORCE)
SET(ANDROID_EMULATOR_AVD "DCMTK" CACHE STRING "Android emulator Android Virtual Device (AVD) configuration" FORCE)
#SET_PROPERTY(CACHE ANDROID_EMULATOR_AVD PROPERTY STRINGS ${ANDROID_AVAILABLE_AVDS})
SET_PROPERTY(CACHE ANDROID_EMULATOR_AVD PROPERTY STRINGS "DCMTK")
After this change, when i click configure and cmake freezed. After couple of changes(to be honest, i don't even remember, i'm trying to build dcmtk almost 2 days) cmake stuck at "Waiting until the Android device emulator is ready to receive instructions" message.
I have builded dcmtk on Windows and Linux withouth any problem but i cannot build it for android. What i'm doing wrong? Is my setup wrong, are dcmtk, sdk, ndk, cmake versions wrong? Is there any prebuilt dcmtk for Android?(I just need binaries like echoscu)
Please advice.
edit: Ok, i find out what the problem was. Wiki says "location of the adb program within your SDK. Called adb.exe under Windows." so i misunderstood that "location" as path but it is executable name with path. After this, cmake generated makefile but i got completion error . I guess it's because of ndk versions, i will download and try again with r9d.
edit2: After i installed ndk r9d, it compiled successfully.