CMP0050: make Sandbox module aware of cmake policy

This commit is contained in:
wmayer
2018-08-20 22:27:36 +02:00
parent 636104bc3a
commit 6b2f24a28c
3 changed files with 28 additions and 12 deletions

View File

@@ -38,14 +38,19 @@ SET(Sandbox_SRCS
PreCompiled.h
)
add_library(Sandbox SHARED ${Sandbox_SRCS})
set (Sandbox_Scripts
../Init.py
../exportDRAWEXE.py
)
add_library(Sandbox SHARED ${Sandbox_SRCS} ${Sandbox_Scripts})
target_link_libraries(Sandbox ${Sandbox_LIBS})
fc_target_copy_resource(Sandbox
${CMAKE_SOURCE_DIR}/src/Mod/Sandbox
fc_target_copy_resource_flat(Sandbox
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/Mod/Sandbox
Init.py)
${Sandbox_Scripts})
SET_BIN_DIR(Sandbox Sandbox /Mod/Sandbox)
SET_PYTHON_PREFIX_SUFFIX(Sandbox)

View File

@@ -1,14 +1,21 @@
add_subdirectory(App)
if(BUILD_GUI)
add_subdirectory(Gui)
add_subdirectory(Gui)
endif(BUILD_GUI)
set(Sandbox_Scripts
Init.py
exportDRAWEXE.py
)
if(BUILD_GUI)
list (APPEND Sandbox_Scripts InitGui.py)
endif(BUILD_GUI)
INSTALL(
FILES
Init.py
InitGui.py
exportDRAWEXE.py
${Sandbox_Scripts}
DESTINATION
Mod/Sandbox
)

View File

@@ -66,14 +66,18 @@ SET(SandboxGui_SRCS
Workbench.h
)
add_library(SandboxGui SHARED ${SandboxGui_SRCS})
set (SandboxGui_Scripts
../InitGui.py
)
add_library(SandboxGui SHARED ${SandboxGui_SRCS} ${SandboxGui_Scripts})
target_link_libraries(SandboxGui ${SandboxGui_LIBS})
fc_target_copy_resource(SandboxGui
${CMAKE_SOURCE_DIR}/src/Mod/Sandbox
fc_target_copy_resource_flat(SandboxGui
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/Mod/Sandbox
InitGui.py)
${SandboxGui_Scripts})
SET_BIN_DIR(SandboxGui SandboxGui /Mod/Sandbox)
SET_PYTHON_PREFIX_SUFFIX(SandboxGui)