Navigation Menu

Skip to content

Commit

Permalink
+ fix copying Python resource files to destination on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Nov 8, 2014
1 parent 951f440 commit bedd2b1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
16 changes: 10 additions & 6 deletions src/Mod/Arch/CMakeLists.txt
@@ -1,7 +1,6 @@
PYSIDE_WRAP_RC(Arch_QRC_SRCS Resources/Arch.qrc)

SET(Arch_SRCS
${Arch_QRC_SRCS}
Init.py
InitGui.py
ArchComponent.py
Expand Down Expand Up @@ -32,15 +31,20 @@ SET(Arch_SRCS
)
SOURCE_GROUP("" FILES ${Arch_SRCS})

SET(all_files ${Arch_SRCS})

ADD_CUSTOM_TARGET(Arch ALL
SOURCES ${all_files}
SOURCES ${Arch_SRCS} ${Arch_QRC_SRCS}
)

fc_copy_sources(Arch "${CMAKE_BINARY_DIR}/Mod/Arch" ${all_files})
fc_copy_sources(Arch "${CMAKE_BINARY_DIR}/Mod/Arch" ${Arch_SRCS})

fc_target_copy_resource(Arch
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/Mod/Arch
Arch_rc.py)

INSTALL(
FILES ${Arch_SRCS}
FILES
${Arch_SRCS}
${Arch_QRC_SRCS}
DESTINATION Mod/Arch
)
13 changes: 8 additions & 5 deletions src/Mod/Draft/CMakeLists.txt
@@ -1,7 +1,6 @@
PYSIDE_WRAP_RC(Draft_QRC_SRCS Resources/Draft.qrc)

SET(Draft_SRCS
${Draft_QRC_SRCS}
Init.py
InitGui.py
Draft.py
Expand All @@ -21,17 +20,21 @@ SET(Draft_SRCS
)
SOURCE_GROUP("" FILES ${Draft_SRCS})

SET(all_files ${Draft_SRCS})

ADD_CUSTOM_TARGET(Draft ALL
SOURCES ${all_files}
SOURCES ${Draft_SRCS} ${Draft_QRC_SRCS}
)

fc_copy_sources(Draft "${CMAKE_BINARY_DIR}/Mod/Draft" ${all_files})
fc_copy_sources(Draft "${CMAKE_BINARY_DIR}/Mod/Draft" ${Draft_SRCS})

fc_target_copy_resource(Draft
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/Mod/Draft
Draft_rc.py)

INSTALL(
FILES
${Draft_SRCS}
${Draft_QRC_SRCS}
DESTINATION
Mod/Draft
)
9 changes: 7 additions & 2 deletions src/Mod/OpenSCAD/CMakeLists.txt
@@ -1,7 +1,6 @@
PYSIDE_WRAP_RC(OpenSCAD_QRC_SRCS Resources/OpenSCAD.qrc)

SET(OpenSCAD_SRCS
${OpenSCAD_QRC_SRCS}
Init.py
InitGui.py
OpenSCAD2Dgeom.py
Expand All @@ -28,11 +27,16 @@ SOURCE_GROUP("ply" FILES ${ply_SRCS})
set(all_files ${OpenSCAD_SRCS} ${ply_SRCS})

ADD_CUSTOM_TARGET(OpenSCAD ALL
SOURCES ${allfiles}
SOURCES ${allfiles} ${OpenSCAD_QRC_SRCS}
)

fc_copy_sources(OpenSCAD "${CMAKE_BINARY_DIR}/Mod/OpenSCAD" ${all_files})

fc_target_copy_resource(OpenSCAD
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/Mod/OpenSCAD
OpenSCAD_rc.py)

INSTALL(
FILES
${ply_SRCS}
Expand All @@ -42,6 +46,7 @@ INSTALL(
INSTALL(
FILES
${OpenSCAD_SRCS}
${OpenSCAD_QRC_SRCS}
DESTINATION
Mod/OpenSCAD
)

0 comments on commit bedd2b1

Please sign in to comment.