CMP0050: make Drawing module aware of cmake policy
This commit is contained in:
@@ -59,50 +59,9 @@ SOURCE_GROUP("Mod" FILES ${Drawing_SRCS})
|
||||
SOURCE_GROUP("Features" FILES ${Features_SRCS})
|
||||
SOURCE_GROUP("Algorithms" FILES ${DrawingAlgos_SRCS})
|
||||
|
||||
SET(Drawing_Templates
|
||||
Templates/A0_Landscape_ISO7200.svg
|
||||
Templates/A0_Landscape_plain.svg
|
||||
Templates/A0_Portrait_plain.svg
|
||||
Templates/A1_Landscape_ISO7200.svg
|
||||
Templates/A1_Landscape_plain.svg
|
||||
Templates/A1_Portrait_plain.svg
|
||||
Templates/A2_Landscape_ISO7200.svg
|
||||
Templates/A2_Landscape_plain.svg
|
||||
Templates/A2_Portrait_plain.svg
|
||||
Templates/A3_Landscape.svg
|
||||
Templates/A3_Landscape_ISO7200.svg
|
||||
Templates/A3_Landscape_plain.svg
|
||||
Templates/A3_Portrait_plain.svg
|
||||
Templates/A4_Landscape.svg
|
||||
Templates/A4_Landscape_ISO7200.svg
|
||||
Templates/A4_Landscape_plain.svg
|
||||
Templates/A4_Portrait_ISO7200.svg
|
||||
Templates/A4_Portrait_plain.svg
|
||||
)
|
||||
|
||||
if(BUILD_USE_PCH)
|
||||
#add_definitions(-D_PreComp_)
|
||||
#GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" Drawing_CPP_SRCS ${Drawing_SRCS} ${Features_SRCS} ${DrawingAlgos_SRCS})
|
||||
#ADD_MSVC_PRECOMPILED_HEADER(Drawing PreCompiled.h PreCompiled.cpp Drawing_CPP_SRCS)
|
||||
endif(BUILD_USE_PCH)
|
||||
|
||||
add_library(Drawing SHARED ${Drawing_SRCS} ${Features_SRCS} ${DrawingAlgos_SRCS})
|
||||
target_link_libraries(Drawing ${Drawing_LIBS})
|
||||
|
||||
SET(Drawing_Scripts
|
||||
Init.py
|
||||
)
|
||||
|
||||
fc_target_copy_resource(Drawing
|
||||
${CMAKE_SOURCE_DIR}/src/Mod/Drawing
|
||||
${CMAKE_BINARY_DIR}/Mod/Drawing
|
||||
${Drawing_Scripts})
|
||||
|
||||
fc_target_copy_resource(Drawing
|
||||
${CMAKE_SOURCE_DIR}/src/Mod/Drawing
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Drawing
|
||||
${Drawing_Templates})
|
||||
|
||||
SET_BIN_DIR(Drawing Drawing /Mod/Drawing)
|
||||
SET_PYTHON_PREFIX_SUFFIX(Drawing)
|
||||
|
||||
|
||||
@@ -4,13 +4,55 @@ if(BUILD_GUI)
|
||||
add_subdirectory(Gui)
|
||||
endif(BUILD_GUI)
|
||||
|
||||
set(Drawing_Scripts
|
||||
Init.py
|
||||
DrawingExample.py
|
||||
DrawingTests.py
|
||||
DrawingPatterns.py
|
||||
)
|
||||
|
||||
if(BUILD_GUI)
|
||||
list (APPEND Drawing_Scripts InitGui.py)
|
||||
endif(BUILD_GUI)
|
||||
|
||||
SET(Drawing_Templates
|
||||
Templates/A0_Landscape_ISO7200.svg
|
||||
Templates/A0_Landscape_plain.svg
|
||||
Templates/A0_Portrait_plain.svg
|
||||
Templates/A1_Landscape_ISO7200.svg
|
||||
Templates/A1_Landscape_plain.svg
|
||||
Templates/A1_Portrait_plain.svg
|
||||
Templates/A2_Landscape_ISO7200.svg
|
||||
Templates/A2_Landscape_plain.svg
|
||||
Templates/A2_Portrait_plain.svg
|
||||
Templates/A3_Landscape.svg
|
||||
Templates/A3_Landscape_ISO7200.svg
|
||||
Templates/A3_Landscape_plain.svg
|
||||
Templates/A3_Portrait_plain.svg
|
||||
Templates/A4_Landscape.svg
|
||||
Templates/A4_Landscape_ISO7200.svg
|
||||
Templates/A4_Landscape_plain.svg
|
||||
Templates/A4_Portrait_ISO7200.svg
|
||||
Templates/A4_Portrait_plain.svg
|
||||
)
|
||||
|
||||
add_custom_target(DrawingScripts ALL
|
||||
SOURCES ${Drawing_Scripts} ${Drawing_Templates}
|
||||
)
|
||||
|
||||
fc_target_copy_resource(Drawing
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_BINARY_DIR}/Mod/Drawing
|
||||
${Drawing_Scripts})
|
||||
|
||||
fc_target_copy_resource(Drawing
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Drawing
|
||||
${Drawing_Templates})
|
||||
|
||||
INSTALL(
|
||||
FILES
|
||||
Init.py
|
||||
InitGui.py
|
||||
DrawingExample.py
|
||||
DrawingTests.py
|
||||
DrawingPatterns.py
|
||||
${Drawing_Scripts}
|
||||
DESTINATION
|
||||
Mod/Drawing
|
||||
)
|
||||
|
||||
@@ -83,30 +83,19 @@ SET(DrawingGuiTaskDlgs_SRCS
|
||||
)
|
||||
SOURCE_GROUP("TaskDialogs" FILES ${DrawingGuiTaskDlgs_SRCS})
|
||||
|
||||
if(BUILD_USE_PCH)
|
||||
#add_definitions(-D_PreComp_)
|
||||
#GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${DrawingGui_SRCS} ${DrawingGuiView_SRCS} ${DrawingGuiViewProvider_SRCS})
|
||||
#ADD_MSVC_PRECOMPILED_HEADER(DrawingGui PreCompiled.h PreCompiled.cpp PCH_SRCS)
|
||||
endif(BUILD_USE_PCH)
|
||||
|
||||
add_library(DrawingGui SHARED ${DrawingGui_SRCS} ${DrawingGuiView_SRCS} ${DrawingGuiViewProvider_SRCS})
|
||||
target_link_libraries(DrawingGui ${DrawingGui_LIBS})
|
||||
|
||||
|
||||
fc_target_copy_resource(DrawingGui
|
||||
${CMAKE_SOURCE_DIR}/src/Mod/Drawing
|
||||
${CMAKE_BINARY_DIR}/Mod/Drawing
|
||||
InitGui.py)
|
||||
|
||||
SET_BIN_DIR(DrawingGui DrawingGui /Mod/Drawing)
|
||||
SET_PYTHON_PREFIX_SUFFIX(DrawingGui)
|
||||
|
||||
INSTALL(TARGETS DrawingGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
SET(DrawingGuiIcon_SVG
|
||||
Resources/icons/DrawingWorkbench.svg
|
||||
)
|
||||
|
||||
add_library(DrawingGui SHARED ${DrawingGui_SRCS} ${DrawingGuiView_SRCS}
|
||||
${DrawingGuiViewProvider_SRCS} ${DrawingGuiIcon_SVG})
|
||||
target_link_libraries(DrawingGui ${DrawingGui_LIBS})
|
||||
|
||||
|
||||
SET_BIN_DIR(DrawingGui DrawingGui /Mod/Drawing)
|
||||
SET_PYTHON_PREFIX_SUFFIX(DrawingGui)
|
||||
|
||||
fc_copy_sources(DrawingGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Drawing" ${DrawingGuiIcon_SVG})
|
||||
|
||||
INSTALL(TARGETS DrawingGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
INSTALL(FILES ${DrawingGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Drawing/Resources/icons")
|
||||
|
||||
Reference in New Issue
Block a user