Hello there!

I have a simple project with the following structure:
root
 CMakeLists.txt
 app
    CMakeLists.txt
    app.cpp
 lib
    CMakeLists.txt
    lib.cpp

The root\CMakeLists.txt contains:
cmake_minimum_required(VERSION 2.6)
project(ROOT)
add_subdirectory(app)
add_subdirectory(lib)

The root\app\CMakeLists.txt contains:
project( APP )
add_executable( app app.cpp )
target_link_libraries( app lib )
add_dependencies( app lib )

The root\app\CMakeLists.txt contains:
project( LIB )
add_library( lib STATIC lib.cpp)

I try to generate Visual Studio 6 project:
cd root
mkdir build
cd build
cmake -G "Visual Studio 6" ..

CMake generates the following:
ALL_BUILD.dsp
ALL_BUILD.dsp.cmake
CMakeCache.txt
cmake_install.cmake
ROOT.dsw
app\ALL_BUILD.dsp
app\ALL_BUILD.dsp.cmake
app\app.dsp
app\app.dsp.cmake
app\APP.dsw
app\CMakeFiles
app\cmake_install.cmake
app\CMakeFiles\ALL_BUILD.rule
CMakeFiles\ALL_BUILD.rule
CMakeFiles\cmake.check_cache
CMakeFiles\CMakeCCompiler.cmake
CMakeFiles\CMakeCPlatform.cmake
CMakeFiles\CMakeCXXCompiler.cmake
CMakeFiles\CMakeCXXPlatform.cmake
CMakeFiles\CMakeDetermineCompilerABI_C.bin
CMakeFiles\CMakeDetermineCompilerABI_CXX.bin
CMakeFiles\CMakeOutput.log
CMakeFiles\CMakeRCCompiler.cmake
CMakeFiles\CMakeSystem.cmake
CMakeFiles\CMakeTmp
CMakeFiles\CMakeTmp\CMakeFiles
CMakeFiles\CMakeTmp\Debug
lib\ALL_BUILD.dsp
lib\ALL_BUILD.dsp.cmake
lib\CMakeFiles
lib\cmake_install.cmake
lib\lib.dsp
lib\lib.dsp.cmake
lib\LIB.dsw
lib\CMakeFiles\ALL_BUILD.rule

When I open ROOT.dsw, I can build all targets correctly according to dependencies. Why cannot I do the same when I open nested app\APP.dsw workspace? In other words, why CMake does not include the lib project into the APP.DSW workspace?

Is it possible to hint CMake to do it?

Thanks in advance for any suggestions,
Anatoly Shirokov.







_______________________________________________
Powered by www.kitware.com

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

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

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

Reply via email to