From 8a69e50d6aff8ea75100a1fb660deecf03b3ea07 Mon Sep 17 00:00:00 2001 From: click Date: Sun, 8 Aug 2010 18:34:35 +0200 Subject: Buildsystem/Windows: Put all finished products (compiled executables and external DLLs) in BUILDDIR/bin// (Some cleanups will be done to this later, this is just POC for developers) --HG-- branch : trunk --- CMakeLists.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10d0e20f0b5..e73241363d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,25 +104,32 @@ if( PREFIX ) set(CMAKE_INSTALL_PREFIX ${PREFIX}) endif() -set(GENREV_SRC - src/genrevision/genrevision.cpp -) - # Handle debugmode compiles (this will require further work for proper WIN32-setups) if( DEBUG ) set(CMAKE_BUILD_TYPE Debug) endif() +if( MSVC ) + # Set up MSVC to dump binaries in the /bin// folder + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +endif() + # # Generate revision-extractor # + +set(GENREV_SRC + src/genrevision/genrevision.cpp +) add_executable(genrev ${GENREV_SRC} ) if( CMAKE_GENERATOR MATCHES "Visual Studio" ) add_custom_target("revision.h" ALL - COMMAND "${CMAKE_BINARY_DIR}/$(ConfigurationName)/genrev" + COMMAND "${CMAKE_BINARY_DIR}/bin/$(Configuration)/genrev" ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" DEPENDS genrev -- cgit v1.2.3