CMP0050: make Points module aware of cmake policy

This commit is contained in:
wmayer
2018-08-20 16:34:54 +02:00
parent d33dff4225
commit 358af8b518
3 changed files with 34 additions and 19 deletions

View File

@@ -54,15 +54,19 @@ SET(Points_SRCS
Structured.h
)
add_library(Points SHARED ${Points_SRCS})
set(Points_Scripts
../Init.py
)
add_library(Points SHARED ${Points_SRCS} ${Points_Scripts})
target_link_libraries(Points ${Points_LIBS})
fc_target_copy_resource(Points
${CMAKE_SOURCE_DIR}/src/Mod/Points
fc_target_copy_resource_flat(Points
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/Mod/Points
Init.py)
${Points_Scripts})
SET_BIN_DIR(Points Points /Mod/Points)
SET_PYTHON_PREFIX_SUFFIX(Points)

View File

@@ -4,10 +4,17 @@ if(BUILD_GUI)
add_subdirectory(Gui)
endif(BUILD_GUI)
set(Points_Scripts
Init.py
)
if(BUILD_GUI)
list (APPEND Points_Scripts InitGui.py)
endif(BUILD_GUI)
INSTALL(
FILES
Init.py
InitGui.py
${Points_Scripts}
DESTINATION
Mod/Points
)

View File

@@ -62,24 +62,28 @@ SET(PointsGui_SRCS
Workbench.h
)
add_library(PointsGui SHARED ${PointsGui_SRCS})
target_link_libraries(PointsGui ${PointsGui_LIBS})
fc_target_copy_resource(PointsGui
${CMAKE_SOURCE_DIR}/src/Mod/Points
${CMAKE_BINARY_DIR}/Mod/Points
InitGui.py)
SET_BIN_DIR(PointsGui PointsGui /Mod/Points)
SET_PYTHON_PREFIX_SUFFIX(PointsGui)
INSTALL(TARGETS PointsGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
set(PointsGui_Scripts
../InitGui.py
)
SET(PointsGuiIcon_SVG
Resources/icons/PointsWorkbench.svg
)
add_library(PointsGui SHARED ${PointsGui_SRCS} ${PointsGui_Scripts} ${PointsGuiIcon_SVG})
target_link_libraries(PointsGui ${PointsGui_LIBS})
fc_target_copy_resource_flat(PointsGui
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/Mod/Points
${PointsGui_Scripts})
SET_BIN_DIR(PointsGui PointsGui /Mod/Points)
SET_PYTHON_PREFIX_SUFFIX(PointsGui)
fc_copy_sources(PointsGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Points" ${PointsGuiIcon_SVG})
INSTALL(TARGETS PointsGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
INSTALL(FILES ${PointsGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Points/Resources/icons")