From 86dc8d09fe322755874f58bd454c5fca4abd4c94 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Sat, 20 Nov 2010 20:20:12 +0000 Subject: [PATCH] For the cmake write generate the svnrev.h file in the build directory instead of in the source so that a proper out-of-source build can be done. Fixes issue 3528. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6449 8ced0084-cf51-0410-be5f-012b33b47a6e --- CMakeLists.txt | 3 +-- Source/Core/Common/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c326251ace..9e8a21feaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -338,10 +338,9 @@ endif(NOT DISABLE_WX) ######################################## # Pre-build events: Define configuration variables and write svnrev header # -file(WRITE ./Source/Core/Common/Src/svnrev.h +file(WRITE ${PROJECT_BINARY_DIR}/Source/Core/Common/Src/svnrev.h "#define SVN_REV_STR \"" ${DOLPHIN_WC_REVISION} "-" ${CMAKE_BUILD_TYPE} "\"") - ######################################## # Start compiling our code # diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt index e1d9ed3889..0f5a216d5e 100644 --- a/Source/Core/Common/CMakeLists.txt +++ b/Source/Core/Common/CMakeLists.txt @@ -39,6 +39,8 @@ if(WIN32) set(SRCS ${SRCS} Src/ExtendedTrace.cpp Src/stdafx.cpp) endif(WIN32) +include_directories("${PROJECT_BINARY_DIR}/Source/Core/Common/Src") + add_library(common STATIC ${SRCS}) if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") add_definitions(-fPIC)