Skip to content

Commit 7d626c3

Browse files
committed
Create custom target for copying Tcl files
1 parent 7dcad1a commit 7d626c3

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,15 @@ ENDIF ( TTK_STUB_LIBRARY )
135135
# IF ( TK_LIBRARY_STATIC )
136136
# TARGET_LINK_LIBRARIES ( ${PKG_TARGET_LIB_NAME} ${TK_LIBRARY_STATIC} )
137137
# ENDIF ( TK_LIBRARY_STATIC )
138-
CONFIGURE_FILE( src/extrafont.tcl tkextrafont/extrafont.tcl )
139-
CONFIGURE_FILE( src/fontnameinfo.tcl tkextrafont/fontnameinfo.tcl )
140-
CONFIGURE_FILE( src/futmp.tcl tkextrafont/futmp.tcl )
141-
CONFIGURE_FILE( src/pkgIndex.tcl tkextrafont/pkgIndex.tcl )
138+
ADD_CUSTOM_TARGET ( copy ALL ${CMAKE_COMMAND} -E copy
139+
${CMAKE_SOURCE_DIR}/src/extrafont.tcl
140+
${CMAKE_SOURCE_DIR}/src/fontnameinfo.tcl
141+
${CMAKE_SOURCE_DIR}/src/pkgIndex.tcl
142+
${CMAKE_SOURCE_DIR}/src/futmp.tcl
143+
./tkextrafont )
144+
ADD_DEPENDENCIES ( ${PKG_TARGET_LIB_NAME} copy )
142145

143-
SET( LIBRARY_OUTPUT_PATH tkextrafont )
146+
SET ( LIBRARY_OUTPUT_PATH tkextrafont )
144147
INSTALL ( TARGETS ${PKG_TARGET_LIB_NAME}
145148
RUNTIME DESTINATION ./tkextrafont
146149
LIBRARY DESTINATION ./tkextrafont

clean.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
rm tkextrafont/libextrafont.dll
33
rm tkextrafont/libextrafont.so
4+
rm tkextrafont/*.tcl
45
rm CMakeCache.txt
56
rm cmake_install.cmake
67
rm -rf cmake-build-debug cmake-build-release

0 commit comments

Comments
 (0)