[CMake] MSYS Makefiles generator problem with install/strip

Robert Bielik Robert.Bielik at dirac.com
Thu Jun 2 10:25:33 EDT 2016


Hi,

I have a problem with the install/strip target not working when using the MSYS Makefiles generator. I get the following result in cmake_install.cmake:

file(INSTALL DESTINATION "c:/Dev/appAndroid/idrclib/src/main/jniLibs/armeabi-v7a" TYPE SHARED_LIBRARY FILES "C:/Dev/jniAndroid/libapi_native.so")
  if(EXISTS "$ENV{DESTDIR}/c:/Dev/appAndroid/idrclib/src/main/jniLibs/armeabi-v7a/libapi_native.so " AND
     NOT IS_SYMLINK "$ENV{DESTDIR}/c:/Dev/appAndroid/idrclib/src/main/jniLibs/armeabi-v7a/libapi_native.so")
    if(CMAKE_INSTALL_DO_STRIP)
      execute_process(COMMAND "C:/android/android-ndk-r11c/standalone/arm/bin/arm-linux-androideabi-strip.exe" "$ENV{DESTDIR}/c:/Dev/appAndroid/idrclib/src/main/jniLibs/armeabi-v7a/libapi_native.so")
    endif()
  endif()
endif()

The above should instead look like:

file(INSTALL DESTINATION "c:/Dev/appAndroid/idrclib/src/main/jniLibs/armeabi-v7a" TYPE SHARED_LIBRARY FILES "C:/Dev/jniAndroid/libapi_native.so")
  if(EXISTS "c:/Dev/appAndroid/idrclib/src/main/jniLibs/armeabi-v7a/libapi_native.so" AND
     NOT IS_SYMLINK "c:/Dev/appAndroid/idrclib/src/main/jniLibs/armeabi-v7a/libapi_native.so")
    if(CMAKE_INSTALL_DO_STRIP)
      execute_process(COMMAND "C:/android/android-ndk-r11c/standalone/arm/bin/arm-linux-androideabi-strip.exe" "c:/Dev/appAndroid/idrclib/src/main/jniLibs/armeabi-v7a/libapi_native.so")
    endif()
  endif()
endif()

Then the install/strip target works.

Regards
/Robert



More information about the CMake mailing list