diff --git a/CMakeLists.txt b/CMakeLists.txt index 075f95562..fa753325b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,14 @@ set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) +if(COMMAND cmake_policy) + cmake_policy(SET CMP0003 NEW) + # added in cmake 3.0 + if(POLICY CMP0050) + cmake_policy(SET CMP0050 OLD) + endif(POLICY CMP0050) +endif(COMMAND cmake_policy) + # include local modules include(AddFileDependencies) include(cMake/FreeCadMacros.cmake) @@ -17,10 +25,6 @@ include(cMake/FreeCadMacros.cmake) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake") -if(COMMAND cmake_policy) - cmake_policy(SET CMP0003 NEW) -endif(COMMAND cmake_policy) - #if(CMAKE_CFG_INTDIR STREQUAL .) # No Debug/Release output paths set(DEBUG_MAIN_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) diff --git a/src/Mod/PartDesign/CMakeLists.txt b/src/Mod/PartDesign/CMakeLists.txt index 44b920041..d9ac48c08 100644 --- a/src/Mod/PartDesign/CMakeLists.txt +++ b/src/Mod/PartDesign/CMakeLists.txt @@ -63,7 +63,7 @@ ADD_CUSTOM_TARGET(WizardShaft ALL SET(all_files ${all_wizardshaft_files}) -fc_copy_sources(Mod/PartDesign "${CMAKE_BINARY_DIR}/Mod/PartDesign" ${all_files}) +fc_copy_sources(WizardShaft "${CMAKE_BINARY_DIR}/Mod/PartDesign" ${all_files}) INSTALL( FILES diff --git a/src/Mod/Plot/CMakeLists.txt b/src/Mod/Plot/CMakeLists.txt index 29b6acdbd..f7faa1a2e 100644 --- a/src/Mod/Plot/CMakeLists.txt +++ b/src/Mod/Plot/CMakeLists.txt @@ -53,7 +53,7 @@ ADD_CUSTOM_TARGET(Plot ALL SOURCES ${all_files} ) -fc_copy_sources(Mod/Plot "${CMAKE_BINARY_DIR}/Mod/Plot" ${all_files}) +fc_copy_sources(Plot "${CMAKE_BINARY_DIR}/Mod/Plot" ${all_files}) INSTALL( FILES diff --git a/src/Mod/Ship/CMakeLists.txt b/src/Mod/Ship/CMakeLists.txt index 420bb1178..bd282f535 100644 --- a/src/Mod/Ship/CMakeLists.txt +++ b/src/Mod/Ship/CMakeLists.txt @@ -69,7 +69,7 @@ ADD_CUSTOM_TARGET(Ship ALL SOURCES ${all_files} ) -fc_copy_sources(Mod/Ship "${CMAKE_BINARY_DIR}/Mod/Ship" ${all_files}) +fc_copy_sources(Ship "${CMAKE_BINARY_DIR}/Mod/Ship" ${all_files}) INSTALL( FILES