From 905fb1a53f54b8e6fc82feeff513587ce5bfbac3 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 17 Feb 2012 00:03:30 +0100 Subject: [PATCH] Fix INSTALL target in cmake files --- CMakeLists.txt | 5 ++--- src/CMakeLists.txt | 4 ++-- src/Mod/PartDesign/App/CMakeLists.txt | 6 ++++-- src/Mod/PartDesign/Gui/CMakeLists.txt | 6 ++++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c8c654cdd..f10b46178 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,17 +56,16 @@ endif(CMAKE_COMPILER_IS_GNUCXX) # ================================================================================ - +# Output directories for install target if(WIN32) SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}) else(WIN32) - SET(CMAKE_INSTALL_PREFIX "/usr/lib${LIB_SUFFIX}/freecad") + SET(CMAKE_INSTALL_PREFIX "/usr/lib${LIB_SUFFIX}/freecad" CACHE PATH "Installation root directory") SET(INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") endif(WIN32) -# Output directories for install target SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files") SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files") SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2c8c233e9..88a57d35b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,9 +12,9 @@ if(FREECAD_BUILD_GUI) configure_file(Doc/freecad.qch ${CMAKE_BINARY_DIR}/doc/freecad.qch COPYONLY) endif(FREECAD_BUILD_GUI) -#if(FREECAD_MAINTAINERS_BUILD) +if(FREECAD_MAINTAINERS_BUILD) add_subdirectory(Doc) -#endif(FREECAD_MAINTAINERS_BUILD) +endif(FREECAD_MAINTAINERS_BUILD) if(FREECAD_MAINTAINERS_BUILD AND WIN32) #add_subdirectory(WindowsInstaller) diff --git a/src/Mod/PartDesign/App/CMakeLists.txt b/src/Mod/PartDesign/App/CMakeLists.txt index 0a87bd07d..fc2ba5956 100644 --- a/src/Mod/PartDesign/App/CMakeLists.txt +++ b/src/Mod/PartDesign/App/CMakeLists.txt @@ -105,7 +105,9 @@ elseif(MINGW) else(MSVC) set_target_properties(PartDesign PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Mod/PartDesign) set_target_properties(PartDesign PROPERTIES PREFIX "") - set_target_properties(PartDesign PROPERTIES INSTALL_RPATH ${INSTALL_RPATH}) + set_target_properties(PartDesign PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/Mod/PartDesign) endif(MSVC) -INSTALL(TARGETS PartDesign DESTINATION lib) +# The PartDesign module must go to where the __init__.py file is +INSTALL(TARGETS PartDesign DESTINATION Mod/PartDesign) + diff --git a/src/Mod/PartDesign/Gui/CMakeLists.txt b/src/Mod/PartDesign/Gui/CMakeLists.txt index 23ef7e9b1..2d6ae25d6 100644 --- a/src/Mod/PartDesign/Gui/CMakeLists.txt +++ b/src/Mod/PartDesign/Gui/CMakeLists.txt @@ -136,7 +136,9 @@ elseif(MINGW) else(MSVC) set_target_properties(PartDesignGui PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Mod/PartDesign) set_target_properties(PartDesignGui PROPERTIES PREFIX "") - set_target_properties(PartDesignGui PROPERTIES INSTALL_RPATH ${INSTALL_RPATH}) + set_target_properties(PartDesignGui PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/Mod/PartDesign) endif(MSVC) -INSTALL(TARGETS PartDesignGui DESTINATION lib) +# The PartDesign module must go to where the __init__.py file is +INSTALL(TARGETS PartDesignGui DESTINATION Mod/PartDesign) +