Skip to content

Commit

Permalink
+ fixes #1361: StartPage scripts and resources are installed twice
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Dec 1, 2014
1 parent dd3412b commit 640c9cb
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 74 deletions.
35 changes: 35 additions & 0 deletions src/Mod/Start/CMakeLists.txt
@@ -1,6 +1,41 @@

add_subdirectory(App)
if(BUILD_GUI)
SET(StartPage_Scripts
StartPage.py
__init__.py
)

SET(StartPage_Resources
ArchDesign.py
DefaultWorkbench.py
LoadDrawingExample.py
LoadPartDesignExample.py
LoadRobotExample.py
LoadSchenkel.py
LoadMRU0.py
LoadMRU1.py
LoadMRU2.py
LoadArchExample.py
Mesh.py
PartDesign.py
Background.jpg
FreeCAD.png
PartDesign.png
ArchDesign.png
Mesh.png
Complete.png
PartDesignExample.png
ArchExample.png
web.png
blank.png
freecad-doc.png
complete.jpg
Ship.py
Ship.png
ShipExample.png
)

add_subdirectory(Gui)
add_subdirectory(StartPage)
endif(BUILD_GUI)
Expand Down
44 changes: 7 additions & 37 deletions src/Mod/Start/Gui/CMakeLists.txt
Expand Up @@ -26,52 +26,22 @@ SET(StartGui_SRCS
Workbench.h
)

SET(StartPage_Scripts
InitGui.py
StartPage/StartPage.py
StartPage/__init__.py
)

SET(StartPage_Resources
StartPage/PartDesign.py
StartPage/ArchDesign.py
StartPage/DefaultWorkbench.py
StartPage/Mesh.py
StartPage/LoadSchenkel.py
StartPage/LoadPartDesignExample.py
StartPage/LoadDrawingExample.py
StartPage/LoadRobotExample.py
StartPage/LoadArchExample.py
StartPage/Background.jpg
StartPage/FreeCAD.png
StartPage/ArchDesign.png
StartPage/PartDesign.png
StartPage/Mesh.png
StartPage/Complete.png
StartPage/LoadMRU0.py
StartPage/LoadMRU1.py
StartPage/LoadMRU2.py
StartPage/PartDesignExample.png
StartPage/ArchExample.png
StartPage/web.png
StartPage/blank.png
StartPage/complete.jpg
StartPage/Ship.py
StartPage/Ship.png
StartPage/ShipExample.png
)

add_library(StartGui SHARED ${StartGui_SRCS})
target_link_libraries(StartGui ${StartGui_LIBS})

fc_target_copy_resource(StartGui
${CMAKE_SOURCE_DIR}/src/Mod/Start
${CMAKE_BINARY_DIR}/Mod/Start
InitGui.py)

fc_target_copy_resource(StartGui
${CMAKE_SOURCE_DIR}/src/Mod/Start/StartPage
${CMAKE_BINARY_DIR}/Mod/Start/StartPage
${StartPage_Scripts})

fc_target_copy_resource(StartGui
${CMAKE_SOURCE_DIR}/src/Mod/Start
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Start
${CMAKE_SOURCE_DIR}/src/Mod/Start/StartPage
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Start/StartPage
${StartPage_Resources})

SET_BIN_DIR(StartGui StartGui /Mod/Start)
Expand Down
39 changes: 2 additions & 37 deletions src/Mod/Start/StartPage/CMakeLists.txt
@@ -1,43 +1,8 @@
SET(StartPage_SRCS
StartPage.py
__init__.py
)

SET(StartPage_DATA
ArchDesign.py
DefaultWorkbench.py
LoadDrawingExample.py
LoadPartDesignExample.py
LoadRobotExample.py
LoadSchenkel.py
LoadMRU0.py
LoadMRU1.py
LoadMRU2.py
LoadArchExample.py
Mesh.py
PartDesign.py
Background.jpg
FreeCAD.png
PartDesign.png
ArchDesign.png
Mesh.png
Complete.png
PartDesignExample.png
ArchExample.png
web.png
blank.png
freecad-doc.png
complete.jpg
Ship.py
Ship.png
ShipExample.png
)

INSTALL(FILES ${StartPage_SRCS}
INSTALL(FILES ${StartPage_Scripts}
DESTINATION Mod/Start/StartPage
)

INSTALL(FILES ${StartPage_DATA}
INSTALL(FILES ${StartPage_Resources}
DESTINATION ${CMAKE_INSTALL_DATADIR}/Mod/Start/StartPage
)

0 comments on commit 640c9cb

Please sign in to comment.