add Mesh_Data target to handle scripts files

This commit is contained in:
wmayer
2018-08-19 22:56:12 +02:00
parent 82b31d50e5
commit bff245daef
3 changed files with 21 additions and 19 deletions

View File

@@ -371,16 +371,6 @@ add_library(Mesh SHARED ${Core_SRCS} ${WildMagic4_SRCS} ${Mesh_SRCS})
target_link_libraries(Mesh ${Mesh_LIBS})
fc_target_copy_resource(Mesh
${CMAKE_SOURCE_DIR}/src/Mod/Mesh
${CMAKE_BINARY_DIR}/Mod/Mesh
Init.py BuildRegularGeoms.py)
fc_target_copy_resource(Mesh
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/Mod/Mesh
MeshTestsApp.py)
SET_BIN_DIR(Mesh Mesh /Mod/Mesh)
SET_PYTHON_PREFIX_SUFFIX(Mesh)

View File

@@ -4,12 +4,29 @@ if(BUILD_GUI)
add_subdirectory(Gui)
endif(BUILD_GUI)
set(Mesh_Scripts
Init.py
BuildRegularGeoms.py
App/MeshTestsApp.py
)
if(BUILD_GUI)
list (APPEND Mesh_Scripts InitGui.py)
endif(BUILD_GUI)
add_custom_target(Mesh_Data ALL
SOURCES ${Mesh_Scripts}
)
fc_target_copy_resource_flat(Mesh_Data
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/Mod/Mesh
${Mesh_Scripts}
)
INSTALL(
FILES
Init.py
InitGui.py
BuildRegularGeoms.py
App/MeshTestsApp.py
${Mesh_Scripts}
DESTINATION
Mod/Mesh
)

View File

@@ -146,11 +146,6 @@ add_library(MeshGui SHARED ${MeshGui_SRCS})
target_link_libraries(MeshGui ${MeshGui_LIBS})
fc_target_copy_resource(MeshGui
${CMAKE_SOURCE_DIR}/src/Mod/Mesh
${CMAKE_BINARY_DIR}/Mod/Mesh
InitGui.py)
SET_BIN_DIR(MeshGui MeshGui /Mod/Mesh)
SET_PYTHON_PREFIX_SUFFIX(MeshGui)