CMP0050: make Import module aware of cmake policy

This commit is contained in:
wmayer
2018-08-20 16:16:13 +02:00
parent 5fed56b612
commit 451b808016
2 changed files with 47 additions and 9 deletions

View File

@@ -20,12 +20,55 @@ endif(BUILD_GUI)
# Import_rc.py)
#ENDIF (BUILD_GUI)
SET(DXF_Plate
DxfPlate/blocks10.rub
DxfPlate/blocks112.rub
DxfPlate/blocks114.rub
DxfPlate/classes14.rub
DxfPlate/entities0.rub
DxfPlate/entities12.rub
DxfPlate/entities14.rub
DxfPlate/header0.rub
DxfPlate/header12.rub
DxfPlate/header14.rub
DxfPlate/objects14.rub
DxfPlate/tables10.rub
DxfPlate/tables112.rub
DxfPlate/tables114.rub
DxfPlate/tables20.rub
DxfPlate/tables212.rub
DxfPlate/tables214.rub
)
set(Import_Scripts
Init.py
gzip_utf8.py
stepZ.py
)
if(BUILD_GUI)
list (APPEND Import_Scripts InitGui.py)
endif(BUILD_GUI)
add_custom_target(ImportScripts ALL
SOURCES ${Import_Scripts} ${DXF_Plate}
)
fc_target_copy_resource(ImportScripts
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/Mod/Import
${Import_Scripts}
)
fc_target_copy_resource(ImportScripts
${CMAKE_SOURCE_DIR}/src/Mod/Import
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Import
${DXF_Plate}
)
INSTALL(
FILES
Init.py
InitGui.py
gzip_utf8.py
stepZ.py
${Import_Scripts}
#${Import_QRC_SRCS}
DESTINATION
Mod/Import

View File

@@ -40,11 +40,6 @@ add_library(ImportGui SHARED ${ImportGui_SRCS})
target_link_libraries(ImportGui ${ImportGui_LIBS})
fc_target_copy_resource(ImportGui
${CMAKE_SOURCE_DIR}/src/Mod/Import
${CMAKE_BINARY_DIR}/Mod/Import
Init.py InitGui.py gzip_utf8.py stepZ.py)
SET_BIN_DIR(ImportGui ImportGui /Mod/Import)
SET_PYTHON_PREFIX_SUFFIX(ImportGui)