[CMake] Release build problem with .exe manifest files.

2014-05-13 Thread Rick McGuire
I have a project that needs to use a specific manifest file when generating
.exe files.  I was able to get this working by specifying the /MANIFEST and
/MANIFESTFILE options on CMAKE_EXE_LINKER_FLAGS.  This works great with the
debug build, but today I finally got around to checking out that the
release build was working correctly.  With the Release build, I'm getting
an error complaining that it can't parse the manifest file.  I suspected at
first the file name was getting messed up on the link command, so I ran
nmake with VERBOSE=1 to see what options were getting used.  The link
command looked ok, although there was an extra /MANIFEST option getting
specified.  The error was coming from a call to mt.exe that was occurring
after the link completed.

Why is this being handled differently between the release and debug builds?
 Is there anything I can do to turn off that mt.exe step, or do I need to
resort to a two step solution such as the one described here:

http://stackoverflow.com/questions/6335352/how-can-i-embed-a-specific-manifest-file-in-a-windows-dll-with-a-cmake-build

I really prefer my solution, since I can handle the problem for all of our
.exes right up front without needing to add a bunch of extra conditional
windows-only steps throughout the configuration file.

Rick
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Boston CMake Course (Early registrations ends May 16)

2014-05-13 Thread Bill Hoffman
There is still room in the "Project Lifecycle Management with CMake 
Family of Tools" course in Boston on June 4, 2014. The early 
registration deadline has been extended to May 16! Sign up now at 
http://training.kitware.fr/browse/69.


Hope to see you there.

-Bill
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Problems to use fixup_bundle on Mac OS X

2014-05-13 Thread Romain LEGUAY
Hello everyone,
I try to build a small Qt application (helloGUI) with a shared library (hello).
Here is my application and library tree:
├── CMakeLists.txt
├── gui
│   ├── CMakeLists.txt
│   ├── bundle.cmake
│   ├── include
│   │   └── MainWindow.hpp
│   ├── src
│   │   ├── MainWindow.cpp
│   │   └── main.cpp
│   └── ui
│   └── mainwindow.ui
└── lib
├── CMakeLists.txt
├── Hello.cpp
└── Hello.h

My root CMakeLists.txt add the two sub directory: lib then gui.
The lib CMakeLists.txt build a shared library (.dylib) and installed it inside 
${CMAKE_INSTALL_PREFIX}/helloGUI.app/Contents/Libraries.
The gui CMakeLists.txt build my Qt bundle (helloGUI.app) and installed it 
inside ${CMAKE_INSTALL_PREFIX} then launch the script bundle.cmake.
bundle.cmake contains:
include(BundleUtilities)
fixup_bundle("${CMAKE_INSTALL_PREFIX}/helloGUI.app" 
"${CMAKE_INSTALL_PREFIX}/helloGUI.app/Contents/Libraries/libHello.dylib" "lib")

If I don’t install it, my application works just fine. But after installation, 
I have some errors:

Install the project...
-- Install configuration: ""
-- Installing: 
/MYPATH/TestQtCMake/build/install/helloGUI.app/Contents/Libraries/libHello.dylib
-- Installing: /MYPATH/TestQtCMake/build/install/./helloGUI.app
-- Installing: /MYPATH/TestQtCMake/build/install/./helloGUI.app/Contents
-- Installing: 
/MYPATH/TestQtCMake/build/install/./helloGUI.app/Contents/Info.plist
-- Installing: /MYPATH/TestQtCMake/build/install/./helloGUI.app/Contents/MacOS
-- Installing: 
/MYPATH/TestQtCMake/build/install/./helloGUI.app/Contents/MacOS/helloGUI
-- fixup_bundle
--   app='/MYPATH/TestQtCMake/build/install/helloGUI.app'
--   
libs='/MYPATH/TestQtCMake/build/install/helloGUI.app/Contents/Libraries/libHello.dylib'
--   dirs='lib'
-- fixup_bundle: preparing...
-- fixup_bundle: copying...
-- 1/10: *NOT* copying 
'/MYPATH/TestQtCMake/build/install/helloGUI.app/Contents/Libraries/libHello.dylib'
-- 2/10: *NOT* copying 
'/MYPATH/TestQtCMake/build/install/helloGUI.app/Contents/MacOS/helloGUI'
-- 3/10: copying 
'/Users/rleguay/Qt5.2.1/5.2.1/clang_64/lib/QtCore.framework/Versions/5/QtCore'
-- 4/10: copying 
'/Users/rleguay/Qt5.2.1/5.2.1/clang_64/lib/QtGui.framework/Versions/5/QtGui'
-- 5/10: copying 
'/Users/rleguay/Qt5.2.1/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets'
-- fixup_bundle: fixing...
-- 6/10: fixing up 
'/MYPATH/TestQtCMake/build/install/helloGUI.app/Contents/Libraries/libHello.dylib'
-- 7/10: fixing up 
'/MYPATH/TestQtCMake/build/install/helloGUI.app/Contents/MacOS/helloGUI'
-- 8/10: fixing up 
'/MYPATH/TestQtCMake/build/install/helloGUI.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore'
-- 9/10: fixing up 
'/MYPATH/TestQtCMake/build/install/helloGUI.app/Contents/Frameworks/QtGui.framework/Versions/5/QtGui'
-- 10/10: fixing up 
'/MYPATH/TestQtCMake/build/install/helloGUI.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets'
-- fixup_bundle: cleaning up...
-- fixup_bundle: verifying...
-- ===
-- Analyzing app='/MYPATH/TestQtCMake/build/install/helloGUI.app'
-- bundle='/MYPATH/TestQtCMake/build/install/helloGUI.app'
-- 
executable='/MYPATH/TestQtCMake/build/install/helloGUI.app/Contents/MacOS/helloGUI'
-- valid='1'
-- executable file 1: 
/MYPATH/TestQtCMake/build/install/helloGUI.app/Contents/MacOS/helloGUI
-- warning: embedded item does not exist 
'/MYPATH/TestQtCMake/build/install/helloGUI.app/Contents/MacOS/libHello.dylib'
-- 
warning: cannot resolve item '@executable_path/../MacOS/libHello.dylib'

  possible problems:
need more directories?
need to use InstallRequiredSystemLibraries?
run in install tree instead of build tree?

warning: target '@executable_path/../MacOS/libHello.dylib' is not absolute...
warning: target '@executable_path/../MacOS/libHello.dylib' does not exist...
error: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool:
 can't open file: @executable_path/../MacOS/libHello.dylib (No such file or 
directory)
error: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool:
 can't open file: @executable_path/../MacOS/libHello.dylib (No such file or 
directory)
-- verified='1'
-- info='Verified 1 executable files in 
'/MYPATH/TestQtCMake/build/install/helloGUI.app''
-- 
-- verified='1'
-- info=''
-- 
-- fixup_bundle: done

I see that the script search libHello.dylib inside Contents/MacOS but I don’t 
understand why. 
Can we set this path please?

Thank you.

Best regards,
Romain-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help

Re: [CMake] version-info module?

2014-05-13 Thread Yngve Inntjore Levinsen

Hi,

Do you meen as in
set_target_properties(mytarget  PROPERTIES VERSION 1.0 SOVERSION 1)
?

Cheers,
Yngve

Den 12. mai 2014 19:24, skrev Orion Poplawski:
Is anyone aware of a cmake module that would be the equivalent of the 
-version-info mechanism in libtool for generating VERSION and SOVERSION?


http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html 





--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake