[CMake] (no subject)

2015-04-28 Thread Lukast dev
Hello guys,

I use multi-configuration generator (MSVC 2008) and I need to create
one solution containing two configurations for one library target N:

For build type Debug target N is compiled as static library
For build type Release target N is compiled as shared library

Something like this, but I know that I can't use CMAKE_BUILD_TYPE
variable when I use multi-configuration generator:

cmake_minimum_required (VERSION 2.8.11)
project (hello)
if(${CMAKE_BUILD_TYPE} STREQUAL Debug)
add_library(hello STATIC main.cpp)
elseif(${CMAKE_BUILD_TYPE} STREQUAL Release)
add_library(hello SHARED main.cpp)
endif()

I already used CMAKE_CXX_FLAGS_DEBUG and CMAKE_CXX_FLAGS_RELEASE
to distinguish some attributes between Debug and Release, but I can't
figure it out in case of the library type (SHARED vs STATIC).

Any ideas how to achieve it?

Thanks
Lukas
-- 

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://public.kitware.com/mailman/listinfo/cmake


[CMake] Generating Visual Studio 2008 solution with specified toolset in command-line

2013-09-20 Thread Lukast dev
Hello,

I partially ported our project from Visual Studio vcproj files to cmake.

I'm successful when I use cmake-gui and I select
generator Visual Studio 9 2008 Windows Mobile 5.0 Smartphone SDK (ARMV4I).
Correct solution file is generated and I can compile.

Now I'm trying to generate solution file using command line for our
intergeration server and
right now running:

mkdir build
cd build
cmake .. -G Visual Studio 9 2008

generates Visual Studio 9 2008 solution and I would like to specify
somehow, not sure if toolset, but that Windows Mobile 5.0 Smartphone SDK
(ARMV4I) part.
I'm able to select it in the list of generators in cmake-gui.

How can I do that in console? I see that there is toolset -T,but it is
supported
by Visual Studio 2010 generator and later, but then how cmake-gui is doing
the trick?

Regards,
Lukas
--

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