CMP0050: make Part module aware of cmake policy

This commit is contained in:
wmayer
2018-08-20 16:54:23 +02:00
parent f7f143a2b9
commit 73e27458da
3 changed files with 70 additions and 73 deletions

View File

@@ -364,38 +364,10 @@ SET(Part_SRCS
FaceMakerBullseye.h
)
SET(Part_Scripts
Init.py
TestPartApp.py
MakeBottle.py
JoinFeatures.py
AttachmentEditor/__init__.py
AttachmentEditor/Commands.py
AttachmentEditor/FrozenClass.py
AttachmentEditor/TaskAttachmentEditor.py
AttachmentEditor/TaskAttachmentEditor.ui
BOPTools/__init__.py
BOPTools/GeneralFuseResult.py
BOPTools/JoinAPI.py
BOPTools/JoinFeatures.py
BOPTools/ShapeMerge.py
BOPTools/SplitAPI.py
BOPTools/SplitFeatures.py
BOPTools/Utils.py
CompoundTools/__init__.py
CompoundTools/_CommandCompoundFilter.py
CompoundTools/CompoundFilter.py
)
add_library(Part SHARED ${Part_SRCS})
target_link_libraries(Part ${Part_LIBS})
fc_target_copy_resource(Part
${CMAKE_SOURCE_DIR}/src/Mod/Part
${CMAKE_BINARY_DIR}/Mod/Part
${Part_Scripts})
SET_BIN_DIR(Part Part /Mod/Part)
SET_PYTHON_PREFIX_SUFFIX(Part)

View File

@@ -4,48 +4,85 @@ if(BUILD_GUI)
add_subdirectory(Gui)
endif(BUILD_GUI)
set(Part_Scripts
Init.py
JoinFeatures.py
MakeBottle.py
TestPartApp.py
)
if(BUILD_GUI)
list (APPEND Part_Scripts
InitGui.py
TestPartGui.py
)
endif(BUILD_GUI)
set(AttachmentEditor_Scripts
AttachmentEditor/__init__.py
AttachmentEditor/Commands.py
AttachmentEditor/FrozenClass.py
AttachmentEditor/TaskAttachmentEditor.py
AttachmentEditor/TaskAttachmentEditor.ui
)
set(BOPTools_Scripts
BOPTools/__init__.py
BOPTools/GeneralFuseResult.py
BOPTools/JoinAPI.py
BOPTools/JoinFeatures.py
BOPTools/ShapeMerge.py
BOPTools/SplitAPI.py
BOPTools/SplitFeatures.py
BOPTools/Utils.py
)
set(CompoundTools_Scripts
CompoundTools/__init__.py
CompoundTools/_CommandCompoundFilter.py
CompoundTools/CompoundFilter.py
)
add_custom_target(PartScripts ALL SOURCES
${Part_Scripts}
${AttachmentEditor_Scripts}
${BOPTools_Scripts}
${CompoundTools_Scripts}
)
fc_target_copy_resource(PartScripts
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/Mod/Part
${Part_Scripts}
${AttachmentEditor_Scripts}
${BOPTools_Scripts}
${CompoundTools_Scripts}
)
INSTALL(
FILES
Init.py
InitGui.py
MakeBottle.py
TestPartApp.py
TestPartGui.py
JoinFeatures.py
${Part_Scripts}
DESTINATION
Mod/Part
)
INSTALL(
FILES
AttachmentEditor/__init__.py
AttachmentEditor/Commands.py
AttachmentEditor/FrozenClass.py
AttachmentEditor/TaskAttachmentEditor.py
AttachmentEditor/TaskAttachmentEditor.ui
${AttachmentEditor_Scripts}
DESTINATION
Mod/Part/AttachmentEditor
)
)
INSTALL(
FILES
BOPTools/__init__.py
BOPTools/GeneralFuseResult.py
BOPTools/JoinAPI.py
BOPTools/JoinFeatures.py
BOPTools/ShapeMerge.py
BOPTools/SplitAPI.py
BOPTools/SplitFeatures.py
BOPTools/Utils.py
${BOPTools_Scripts}
DESTINATION
Mod/Part/BOPTools
)
)
INSTALL(
FILES
CompoundTools/__init__.py
CompoundTools/_CommandCompoundFilter.py
CompoundTools/CompoundFilter.py
${CompoundTools_Scripts}
DESTINATION
Mod/Part/CompoundTools
)
)

View File

@@ -253,30 +253,18 @@ SET(PartGui_SRCS
TaskAttacher.cpp
)
SET(PartGui_Scripts
InitGui.py
TestPartGui.py
)
add_library(PartGui SHARED ${PartGui_SRCS})
target_link_libraries(PartGui ${PartGui_LIBS})
fc_target_copy_resource(PartGui
${CMAKE_SOURCE_DIR}/src/Mod/Part
${CMAKE_BINARY_DIR}/Mod/Part
${PartGui_Scripts})
SET_BIN_DIR(PartGui PartGui /Mod/Part)
SET_PYTHON_PREFIX_SUFFIX(PartGui)
INSTALL(TARGETS PartGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
SET(PartGuiIcon_SVG
Resources/icons/PartWorkbench.svg
)
add_library(PartGui SHARED ${PartGui_SRCS} ${PartGuiIcon_SVG})
target_link_libraries(PartGui ${PartGui_LIBS})
SET_BIN_DIR(PartGui PartGui /Mod/Part)
SET_PYTHON_PREFIX_SUFFIX(PartGui)
fc_copy_sources(PartGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Part" ${PartGuiIcon_SVG})
INSTALL(TARGETS PartGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
INSTALL(FILES ${PartGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Part/Resources/icons")