From f6ab45c60f9f230f38249511539d4f4a46e24696 Mon Sep 17 00:00:00 2001 From: Philippe Hamelin Date: Thu, 7 Apr 2011 10:57:47 -0400 Subject: [PATCH] cmake: disable removing of pluginpath.cpp for in-tree builds. The in-tree build was broken because the newly generated pluginpath.cpp was removed. --- rtt/plugin/CMakeLists.txt | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rtt/plugin/CMakeLists.txt b/rtt/plugin/CMakeLists.txt index b84d57b..1947cb6 100644 --- a/rtt/plugin/CMakeLists.txt +++ b/rtt/plugin/CMakeLists.txt @@ -9,8 +9,11 @@ if ( PLUGINS_ENABLE ) endif() configure_file( pluginpath.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/pluginpath.cpp @ONLY ) - # This to reduce upgrade pains for in-tree upgraders: - execute_process( COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_CURRENT_SOURCE_DIR}/pluginpath.cpp ) + + if (NOT (${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})) + # This to reduce upgrade pains for in-tree upgraders: + execute_process( COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_CURRENT_SOURCE_DIR}/pluginpath.cpp ) + endif() FILE( GLOB CPPS [^.]*.cpp ) FILE( GLOB HPPS [^.]*.hpp [^.]*.h [^.]*.inl) -- 1.7.0.4