diff --git a/src/Mod/Path/App/CMakeLists.txt b/src/Mod/Path/App/CMakeLists.txt index 89b162ff24..72d437af95 100644 --- a/src/Mod/Path/App/CMakeLists.txt +++ b/src/Mod/Path/App/CMakeLists.txt @@ -113,18 +113,9 @@ SOURCE_GROUP("Module" FILES ${Mod_SRCS}) # SOURCE_GROUP("KDL" FILES ${KDL_SRCS} ${KDL_HPPS} ${UTIL_SRCS} ${UTIL_HPPS} ) #endif(WIN32) -SET(Path_Scripts - Init.py -) - add_library(Path SHARED ${Path_SRCS}) target_link_libraries(Path ${Path_LIBS}) -fc_target_copy_resource(Path - ${CMAKE_SOURCE_DIR}/src/Mod/Path - ${CMAKE_BINARY_DIR}/Mod/Path - ${Path_Scripts}) - SET_BIN_DIR(Path Path /Mod/Path) SET_PYTHON_PREFIX_SUFFIX(Path) diff --git a/src/Mod/Path/CMakeLists.txt b/src/Mod/Path/CMakeLists.txt index d595c22c4a..84a17bf39a 100644 --- a/src/Mod/Path/CMakeLists.txt +++ b/src/Mod/Path/CMakeLists.txt @@ -6,13 +6,19 @@ if(BUILD_GUI) add_subdirectory(Gui) endif(BUILD_GUI) +set(Path_Scripts + Init.py + PathCommands.py + TestPathApp.py +) + +if(BUILD_GUI) + list (APPEND Path_Scripts InitGui.py) +endif(BUILD_GUI) + INSTALL( FILES - Init.py - InitGui.py - PathCommands.py - TestPathApp.py - + ${Path_Scripts} DESTINATION Mod/Path ) @@ -165,7 +171,7 @@ ADD_CUSTOM_TARGET(PathScripts ALL ) SET(test_files - TestPathApp.py + ${Path_Scripts} ${PathTests_SRCS} ) diff --git a/src/Mod/Path/Gui/CMakeLists.txt b/src/Mod/Path/Gui/CMakeLists.txt index 2be21706d1..21d007e5fd 100644 --- a/src/Mod/Path/Gui/CMakeLists.txt +++ b/src/Mod/Path/Gui/CMakeLists.txt @@ -94,23 +94,17 @@ SET(PathGui_SRCS ${PathGui_SRCS_ViewProvider} ) -add_library(PathGui SHARED ${PathGui_SRCS}) -target_link_libraries(PathGui ${PathGui_LIBS}) - -fc_target_copy_resource(PathGui - ${CMAKE_SOURCE_DIR}/src/Mod/Path - ${CMAKE_BINARY_DIR}/Mod/Path - InitGui.py) - -SET_BIN_DIR(PathGui PathGui /Mod/Path) -SET_PYTHON_PREFIX_SUFFIX(PathGui) - -INSTALL(TARGETS PathGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) - SET(PathGuiIcon_SVG Resources/icons/PathWorkbench.svg ) +add_library(PathGui SHARED ${PathGui_SRCS} ${PathGuiIcon_SVG}) +target_link_libraries(PathGui ${PathGui_LIBS}) + +SET_BIN_DIR(PathGui PathGui /Mod/Path) +SET_PYTHON_PREFIX_SUFFIX(PathGui) + fc_copy_sources(PathGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Path" ${PathGuiIcon_SVG}) +INSTALL(TARGETS PathGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) INSTALL(FILES ${PathGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Path/Resources/icons")