Draft: fix CMakeLists to install files in directories
This commit is contained in:
@@ -4,6 +4,33 @@ IF (BUILD_GUI)
|
||||
PYSIDE_WRAP_RC(Draft_QRC_SRCS Resources/Draft.qrc)
|
||||
ENDIF (BUILD_GUI)
|
||||
|
||||
SET(Draft_SRCS_base
|
||||
Init.py
|
||||
InitGui.py
|
||||
Draft.py
|
||||
DraftTools.py
|
||||
DraftGui.py
|
||||
DraftSnap.py
|
||||
DraftTrackers.py
|
||||
DraftVecUtils.py
|
||||
DraftGeomUtils.py
|
||||
DraftLayer.py
|
||||
DraftEdit.py
|
||||
DraftFillet.py
|
||||
DraftSelectPlane.py
|
||||
WorkingPlane.py
|
||||
getSVG.py
|
||||
TestDraft.py
|
||||
)
|
||||
|
||||
SET(Draft_import
|
||||
importAirfoilDAT.py
|
||||
importDXF.py
|
||||
importDWG.py
|
||||
importOCA.py
|
||||
importSVG.py
|
||||
)
|
||||
|
||||
SET(Draft_tests
|
||||
drafttests/__init__.py
|
||||
drafttests/auxiliary.py
|
||||
@@ -37,67 +64,60 @@ SET(Draft_task_panels
|
||||
drafttaskpanels/__init__.py
|
||||
)
|
||||
|
||||
SET(Draft_SRCS
|
||||
SET(Draft_SRCS_all
|
||||
${Draft_SRCS_base}
|
||||
${Draft_import}
|
||||
${Draft_tests}
|
||||
${Draft_objects}
|
||||
${Draft_view_providers}
|
||||
${Draft_GUI_tools}
|
||||
${Draft_task_panels}
|
||||
Init.py
|
||||
InitGui.py
|
||||
Draft.py
|
||||
DraftTools.py
|
||||
DraftGui.py
|
||||
DraftSnap.py
|
||||
DraftTrackers.py
|
||||
DraftVecUtils.py
|
||||
DraftGeomUtils.py
|
||||
DraftLayer.py
|
||||
DraftEdit.py
|
||||
DraftFillet.py
|
||||
DraftSelectPlane.py
|
||||
WorkingPlane.py
|
||||
getSVG.py
|
||||
importDXF.py
|
||||
importOCA.py
|
||||
importSVG.py
|
||||
importDWG.py
|
||||
importAirfoilDAT.py
|
||||
TestDraft.py
|
||||
)
|
||||
SOURCE_GROUP("" FILES ${Draft_SRCS})
|
||||
|
||||
# Cmake documentation: source_group defines a group into which sources
|
||||
# will be placed in project files. This is intended to set up file tabs
|
||||
# in Visual Studio.
|
||||
#
|
||||
# Maybe we don't need this anymore? For example, FEM doesn't use it.
|
||||
SOURCE_GROUP("" FILES ${Draft_SRCS_all})
|
||||
|
||||
SET(DraftGuiIcon_SVG
|
||||
Resources/icons/DraftWorkbench.svg
|
||||
)
|
||||
|
||||
ADD_CUSTOM_TARGET(Draft ALL
|
||||
SOURCES ${Draft_SRCS} ${Draft_QRC_SRCS} ${DraftGuiIcon_SVG}
|
||||
SOURCES ${Draft_SRCS_all} ${Draft_QRC_SRCS} ${DraftGuiIcon_SVG}
|
||||
)
|
||||
|
||||
fc_copy_sources(Draft "${CMAKE_BINARY_DIR}/Mod/Draft" ${Draft_SRCS})
|
||||
fc_copy_sources(Draft "${CMAKE_BINARY_DIR}/Mod/Draft" ${Draft_SRCS_all})
|
||||
|
||||
fc_copy_sources(Draft "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Draft" ${DraftGuiIcon_SVG})
|
||||
|
||||
IF (BUILD_GUI)
|
||||
fc_target_copy_resource(Draft
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}/Mod/Draft
|
||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||
"${CMAKE_BINARY_DIR}/Mod/Draft"
|
||||
Draft_rc.py)
|
||||
ENDIF (BUILD_GUI)
|
||||
|
||||
INSTALL(
|
||||
FILES
|
||||
${Draft_SRCS}
|
||||
${Draft_SRCS_base}
|
||||
${Draft_import}
|
||||
${Draft_QRC_SRCS}
|
||||
DESTINATION
|
||||
Mod/Draft
|
||||
)
|
||||
|
||||
INSTALL(FILES ${Draft_tests} DESTINATION Mod/Draft/drafttests)
|
||||
INSTALL(FILES ${Draft_objects} DESTINATION Mod/Draft/draftobjects)
|
||||
INSTALL(FILES ${Draft_view_providers} DESTINATION Mod/Draft/draftviewproviders)
|
||||
INSTALL(FILES ${Draft_GUI_tools} DESTINATION Mod/Draft/draftguitools)
|
||||
INSTALL(FILES ${Draft_task_panels} DESTINATION Mod/Draft/drafttaskpanels)
|
||||
|
||||
INSTALL(
|
||||
FILES
|
||||
${DraftGuiIcon_SVG}
|
||||
DESTINATION
|
||||
"${CMAKE_INSTALL_DATADIR}/Mod/Draft/Resources/icons"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user