Re: [CMake] selecting different libraries for different configuration types?

2009-11-10 Thread Roger Dannenberg
Just to bring this to closure, I ended up creating a special directory just to separate the static library target from the dynamic library target. Both targets use the same sources, so there's some undesirable redundancy between the two CMakeLists.txt files, but at least I was able to get

[CMake] selecting different libraries for different configuration types?

2009-11-02 Thread Roger Dannenberg
Is it possible for cmake to create VisualStudio projects that have a different set of libraries (AdditionalDependencies) for each configuration type? Specifically, I want to link my application's Debug version with mylib.lib, which is a dynamic library, and my application's Release version

Re: [CMake] selecting different libraries for different configuration types?

2009-11-02 Thread Tyler Roscoe
On Mon, Nov 02, 2009 at 09:48:35AM -0500, Roger Dannenberg wrote: Is it possible for cmake to create VisualStudio projects that have a different set of libraries (AdditionalDependencies) for each configuration type? Look at the debug/optimized flags to target_link_libraries(). tyler

Re: [CMake] selecting different libraries for different configuration types?

2009-11-02 Thread Pau Garcia i Quiles
On Mon, Nov 2, 2009 at 3:48 PM, Roger Dannenberg r...@cs.cmu.edu wrote: Is it possible for cmake to create VisualStudio projects that have a different set of libraries (AdditionalDependencies) for each configuration type? Specifically, I want to link my application's Debug version with

Re: [CMake] selecting different libraries for different configuration types?

2009-11-02 Thread Roger Dannenberg
Thanks -- just what I needed. Now that library selection is working, I'm having problems with library generation: I'm generating two versions of a C library (static and dynamic) and I want to control the C Runtime Library selection for the debug and release version of each. I tried for

Re: [CMake] selecting different libraries for different configuration types?

2009-11-02 Thread Tyler Roscoe
On Mon, Nov 02, 2009 at 06:32:19PM -0500, Roger Dannenberg wrote: set_target_properties(mylib-static PROPERTIES CMAKE_C_FLAGS_DEBUG /MTd) but the general CMAKE_C_FLAGS_DEBUG variable seems to be determining the compiler flags. I can control the flags with CMAKE_C_FLAGS_DEBUG and

Re: [CMake] selecting different libraries for different configuration types?

2009-11-02 Thread Roger Dannenberg
Tyler Roscoe wrote: On Mon, Nov 02, 2009 at 06:32:19PM -0500, Roger Dannenberg wrote: set_target_properties(mylib-static PROPERTIES CMAKE_C_FLAGS_DEBUG /MTd) but the general CMAKE_C_FLAGS_DEBUG variable seems to be determining the compiler flags. I can control the flags with

Re: [CMake] selecting different libraries for different configuration types?

2009-11-02 Thread Philip Lowman
On Mon, Nov 2, 2009 at 7:36 PM, Roger Dannenberg r...@cs.cmu.edu wrote: Tyler Roscoe wrote: On Mon, Nov 02, 2009 at 06:32:19PM -0500, Roger Dannenberg wrote: set_target_properties(mylib-static PROPERTIES CMAKE_C_FLAGS_DEBUG /MTd) Thanks again. COMPILE_FLAGS seems to pass target-specific