Re: [CMake] Install target after building it

2013-04-22 Thread Matthew Woehlke
On 2013-04-22 19:46, Matthew Woehlke wrote: On 2013-04-22 18:12, Robert Dailey wrote: I want to setup a target's header files to be copied to a separate directory after that target is built. Any dependent targets will reference the INSTALLED header files, so they must be copied after that target

Re: [CMake] Install target after building it

2013-04-22 Thread Matthew Woehlke
On 2013-04-22 18:12, Robert Dailey wrote: I want to setup a target's header files to be copied to a separate directory after that target is built. Any dependent targets will reference the INSTALLED header files, so they must be copied after that target is built and prior to any other targets (tha

[CMake] Sublime Text 2

2013-04-22 Thread Andrew Maclean
Is anyone using Sublime Text 2: http://www.sublimetext.com/2. If so, do you know of, or can recommend a good CMake syntax highlighter? It seems to be a really useful cross-platform text editor that is consistent and easily customisable. Regards Andrew --

[CMake] Install target after building it

2013-04-22 Thread Robert Dailey
I want to setup a target's header files to be copied to a separate directory after that target is built. Any dependent targets will reference the INSTALLED header files, so they must be copied after that target is built and prior to any other targets (that depend on it) that get built. Is there a

Re: [CMake] Sharing sources between two targets

2013-04-22 Thread J Decker
to use the same sources in multiple outputs, with different compile options, I make a copy of the file (copy_if_different) into the binary, and then specify that for the related projects. EXECUTE_PROCESS(COMMAND cmake -E copy_if_different ${CMAKE_SOURCE_DIR}/${VECTLIB_SOURCES} ${CMAKE_BINARY_DIR}/

Re: [CMake] Sharing sources between two targets

2013-04-22 Thread Nick Gnedin
Indeed everything works that way, many thanks, guys. On 04/22/2013 02:09 PM, David Cole wrote: No, it doesn't double anything. Without the outside_deps, the executable wouldn't link if it needed something from them. With them, it will link, and be as small a size as the linker can make it.

Re: [CMake] Sharing sources between two targets

2013-04-22 Thread David Cole
No, it doesn't double anything. Without the outside_deps, the executable wouldn't link if it needed something from them. With them, it will link, and be as small a size as the linker can make it. (Assuming a release build, where the linker leaves out what it doesn't need...) -Origina

Re: [CMake] Sharing sources between two targets

2013-04-22 Thread Rolf Eike Beer
Nick Gnedin wrote: > That doubles the size of the executable, because if I do something like > that: > > ADD_LIBRARY(temp STATIC ${sources}) > TARGET_LINK_LIBRARIES(temp outside_deps) > > ADD_EXECUTABLE(code main.cpp) > TARGET_LINK_LIBRARIES(code temp) > > then TARGET_LINK_LIBRARIES(...) also ad

Re: [CMake] Sharing sources between two targets

2013-04-22 Thread Nick Gnedin
That doubles the size of the executable, because if I do something like that: ADD_LIBRARY(temp STATIC ${sources}) TARGET_LINK_LIBRARIES(temp outside_deps) ADD_EXECUTABLE(code main.cpp) TARGET_LINK_LIBRARIES(code temp) then TARGET_LINK_LIBRARIES(...) also add outside_deps as link libraries f

Re: [CMake] Sharing sources between two targets

2013-04-22 Thread Alessio
A static lib does what you want and won't introduce any extra runtime dependecies On 22 Apr 2013 19:45, "Nick Gnedin" wrote: > > Folks, > > I am using CMake to create 2 targets - a stand-alone executable and a > library that can be imported by Python. Both share most of the sources. If > I just s

Re: [CMake] Sharing sources between two targets

2013-04-22 Thread Jean-Christophe Fillion-Robin
Hi Nick, What about creating a static library that would be linked against both the executable and the library ? Hth Jc On Mon, Apr 22, 2013 at 2:45 PM, Nick Gnedin wrote: > > Folks, > > I am using CMake to create 2 targets - a stand-alone executable and a > library that can be imported by Py

[CMake] Sharing sources between two targets

2013-04-22 Thread Nick Gnedin
Folks, I am using CMake to create 2 targets - a stand-alone executable and a library that can be imported by Python. Both share most of the sources. If I just specify them as two separate targets, each will compile all the sources, so most of the source files end up compiled twice. Is there

[CMake] Excluding targets from a solution config in a Visual Studio build

2013-04-22 Thread Alessio
Hi there Is there a way to tell the Visual Studio generators that a target should not be included in “whole solution” builds? With the following sequence A will be excluded from all solution configurations, but B will be included. add_custom_target(A) add_custom_target(B COMMAND echo This is ta

[CMake] Cross compile an external makefile project.

2013-04-22 Thread Jeff Shanab
I have a project to port to the raspberry pi. I managed to get boost to cross-compile with the externalproject_Add on windows and am trying to do something similar with curl. Because curl uses make and not bjam, I switched over to a linux build agent but I am having difficulty. Everything seem

Re: [CMake] Binary directory on different drive

2013-04-22 Thread Robert Dailey
Awesome!! I just tried RC3 and it works now. Great job On Mon, Apr 22, 2013 at 10:54 AM, Brad King wrote: > On 04/19/2013 07:08 PM, Robert Dailey wrote: >> C:\work\buildlibrary >> Instead of: >> C:\work\build\library >> >> The slash between "build" and "library" is missing. Any reason for >>

Re: [CMake] Binary directory on different drive

2013-04-22 Thread Brad King
On 04/19/2013 07:08 PM, Robert Dailey wrote: > C:\work\buildlibrary > Instead of: > C:\work\build\library > > The slash between "build" and "library" is missing. Any reason for > this? It doesn't do it if the source & binary directories are on the > same drive letter. Almost certainly this is:

Re: [CMake] CPack Generator for the Mac App Store

2013-04-22 Thread Brian Milco
> > Does this workflow in your MacAppStore generator include anything that > prevents making a .pkg for OS X Installer? > From the stackoverlfow link below, the person says App Store submissions > follow different rules. Do you know what those differences are? > As I've never created an OS X Inst

Re: [CMake] Binary directory on different drive

2013-04-22 Thread Robert Dailey
Sorry to bump, but any help on this? :) On Fri, Apr 19, 2013 at 6:08 PM, Robert Dailey wrote: > I am invoking CMake like this on Windows: > > Working directory is: C:\work\build > Directory containing source & root level CMakeLists.txt file: Y:\ > > So I invoke like this: > > C:\work\build> cmake

[CMake] CMake VS2011Arm patch

2013-04-22 Thread Igor Novikov
Hi! I’ve developed patch for Visual Studio ARM support. (Patch file is attached) I'd like you to try patch functionality and get a review.  With regards, Vladimir.diff --git a/cmake-2.8.10.2/Modules/CMakeTestCXXCompiler.cmake b/cmake-2.8.10.2/Modules/CMakeTestCXXCompiler.cmake index a5cdf56..ab15

Re: [CMake] Problem with get_filename_component() and CMAKE_CXX_COMPILER when finding Qt4

2013-04-22 Thread Petr Kmoch
If you look at the trace, you'll see the following few lines before the error: C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindQt4.cmake(738): set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES} ) C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindQt4.cmake(739): set

Re: [CMake] Problem with get_filename_component() and CMAKE_CXX_COMPILER when finding Qt4

2013-04-22 Thread Rolf Eike Beer
Am 22.04.2013 14:26, schrieb Petr Kmoch: Hi all. I'm using CMake 2.8.10.2 to do a Visual Studio 2010 64-bit build, and I encountered a weird problem with the CMake configure step failing, with the following output: CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMake