move project templates from source tree to library tree

This commit is contained in:
Dick Hollenbeck 2013-04-13 16:27:04 -05:00
parent 9058a53e6f
commit a6a1ab5c27
2 changed files with 18 additions and 0 deletions

View File

@ -18,6 +18,7 @@ if(UNIX)
CACHE PATH "Location of KiCad data files.")
set(KICAD_MODULES ${KICAD_DATA}/modules)
set(KICAD_LIBRARY ${KICAD_DATA}/library)
set(KICAD_TEMPLATES ${KICAD_DATA}/template)
endif(APPLE)
endif(UNIX)
@ -28,6 +29,7 @@ if(WIN32)
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
set(KICAD_MODULES modules)
set(KICAD_LIBRARY library)
set(KICAD_TEMPLATES template)
endif(WIN32)
mark_as_advanced(KICAD_DATA
@ -38,3 +40,4 @@ mark_as_advanced(KICAD_DATA
# Resources.
add_subdirectory(library)
add_subdirectory(modules)
add_subdirectory(template)

15
template/CMakeLists.txt Normal file
View File

@ -0,0 +1,15 @@
# "template_lst" will be a list of all templates.
# Each template is a directory here.
file( GLOB template_lst RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * )
#message( template_lst:${template_lst} )
# don't include CMakeLists.txt or CMakeLists.txt~ which could be in the GLOB list
string( REGEX REPLACE "CMakeLists.txt~*;?" "" template_lst "${template_lst}" )
#message( template_lst:${template_lst} )
foreach( tpl ${template_lst} )
#message( tpl:${tpl} )
install( DIRECTORY ${tpl} DESTINATION ${KICAD_TEMPLATES} COMPONENT templates )
endforeach()