---------- Forwarded message ---------- From: John Drescher <dresche...@gmail.com> Date: Tue, Nov 10, 2009 at 5:22 PM Subject: Re: [CMake] How to build INSTALL project from the command line? To: aaron_wri...@selinc.com
On Tue, Nov 10, 2009 at 5:09 PM, <aaron_wri...@selinc.com> wrote: > > I've been trying to build the INSTALL project as part of the solution from > the commandline. For example, after running: > > cmake -G "Visual Studio 9 2008" .. > > I've tried: > > msbuild /t:INSTALL /p:Configuration=Release solution.sln > > But this builds ALL_BUILD and then tells me tells me: > > The project "INSTALL" is not selected for building in solution configuration > "Release|Win32" > > Is there a way to make this work from cmake's end? I've tried every > commandline swtich I can think of for msbuild but have had no luck. I can > build the INSTALL.vcproj directly, but this looses the dependencies between > projects, like INSTALL's dependency on ALL_BUILD. I'd like to get this done > with one call if possible. I have each project configure an install.bat.in file that creates an install.bat file in the build folder Here is a sample install.bat.in devenv @project_binary_...@\@project_n...@.sln /build Debug /project INSTALL devenv @project_binary_...@\@project_n...@.sln /build @RELEASE_BUILD_NAME@ /project INSTALL Then the generated install.bat devenv X:/32Bit/VC.80/Qt/QtBasicUtils\QtBasicUtils.sln /build Debug /project INSTALL devenv X:/32Bit/VC.80/Qt/QtBasicUtils\QtBasicUtils.sln /build RelWithDebInfo /project INSTALL And the configuration in my CMakeLists.txt IF (MAKE_DEBUGRELEASE) SET (CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebInfo" CACHE STRING "Debug;RelWithDebInfo" FORCE) SET (RELEASE_BUILD_NAME "RelWithDebInfo") ELSE(MAKE_DEBUGRELEASE) SET (CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Debug;Release" FORCE) SET (RELEASE_BUILD_NAME "Release") ENDIF (MAKE_DEBUGRELEASE) configure_file ( "${PROJECT_SOURCE_DIR}/install.bat.in" "${PROJECT_BINARY_DIR}/Batch/install.bat" ) -- John M. Drescher _______________________________________________ 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