fletcher / ios-cmake

Automatically exported from code.google.com/p/ios-cmake
2 stars 4 forks source link

Installation failed #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. cmake -DCMAKE_INSTALL_PREFIX=$HOME/install -DCMAKE_BUILD_TYPE=Release 
-DCMAKE_TOOLCHAIN_FILE=../code/iOS.toolchain.cmake -DIOS_PLATFORM=SIMULATOR 
-GXcode ../code
2. cmake --build . --target install --config Release

What is the expected output? What do you see instead?
The library are built but they are not installed as expected. No files are 
installed but directory structure is created ($HOME/install/lib)

the second cmake command ends with:

-- Install configuration: "Release-iphones"

** BUILD SUCCEEDED **

No error reported.

What version of the product are you using? On what operating system?
cmake 2.8.10, macosx mountain lion, xcode 4.52 + command line tools.

Please provide any additional information below.

Looking into the file "cmake_install.cmake", I found that 
CMAKE_INSTALL_CONFIG_NAME is set to Release-iphoneos but it is tested against 
values Debug, Release, MinSizeRel, RelWithDebInfo.

Also, the CMAKE_INSTALL_COMPONENT variable is empty.

Thanks,
   Julien.

Original issue reported on code.google.com by allali.j...@gmail.com on 12 Nov 2012 at 9:44

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
This is actually a cmake bug, issue: 0012506

http://www.cmake.org/Bug/print_bug_page.php?bug_id=12506

They have a fix but it has been delayed to a future version.

You can work around it in your project CMakeLists.txt by doing something like 
the following:

if (iOS)
            install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/\$ENV{CONFIGURATION}\$ENV{EFFECTIVE_PLATFORM_NAME}/ DESTINATION lib COMPONENT mylibname FILES_MATCHING PATTERN "*.a")
endif (iOS)

Original comment by wizzr...@gmail.com on 12 Nov 2012 at 1:56

GoogleCodeExporter commented 8 years ago
I missed the cmake issue: Thank a lot for this really quick reply!

Julien.

Original comment by allali.j...@gmail.com on 12 Nov 2012 at 4:20

GoogleCodeExporter commented 8 years ago
No problem, took me a bit to figure out what was up the first time too.

Thanks for reporting! 

Original comment by wizzr...@gmail.com on 12 Nov 2012 at 4:43