Mercurial > louis > kiibohd-controller
annotate Lib/CMake/kll.cmake @ 206:c6a90fe8cf2f
Adding git refresh command to kll.cmake and kll file listing to build process
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Sun, 14 Sep 2014 16:03:10 -0700 |
parents | a2e9bb170eef |
children | 5805b1abb5d4 |
rev | line source |
---|---|
205
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
1 ###| CMAKE Kiibohd Controller KLL Configurator |### |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
2 # |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
3 # Written by Jacob Alexander in 2014 for the Kiibohd Controller |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
4 # |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
5 # Released into the Public Domain |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
6 # |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
7 ### |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
8 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
9 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
10 ### |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
11 # Check if KLL compiler is needed |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
12 # |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
13 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
14 if ( "${MacroModule}" STREQUAL "PartialMap" ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
15 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
16 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
17 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
18 ### |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
19 # KLL Installation (Make sure repo has been cloned) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
20 # |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
21 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
22 if ( NOT EXISTS "${PROJECT_SOURCE_DIR}/kll/kll.py" ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
23 # Make sure git is available |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
24 find_package ( Git REQUIRED ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
25 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
26 # Clone kll git repo |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
27 execute_process ( COMMAND ${GIT_EXECUTABLE} clone https://github.com/kiibohd/kll.git |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
28 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
29 ) |
206
c6a90fe8cf2f
Adding git refresh command to kll.cmake and kll file listing to build process
Jacob Alexander <haata@kiibohd.com>
parents:
205
diff
changeset
|
30 else () # Otherwise attempt to update the repo |
c6a90fe8cf2f
Adding git refresh command to kll.cmake and kll file listing to build process
Jacob Alexander <haata@kiibohd.com>
parents:
205
diff
changeset
|
31 # Clone kll git repo |
c6a90fe8cf2f
Adding git refresh command to kll.cmake and kll file listing to build process
Jacob Alexander <haata@kiibohd.com>
parents:
205
diff
changeset
|
32 execute_process ( COMMAND ${GIT_EXECUTABLE} pull --rebase |
c6a90fe8cf2f
Adding git refresh command to kll.cmake and kll file listing to build process
Jacob Alexander <haata@kiibohd.com>
parents:
205
diff
changeset
|
33 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/kll |
c6a90fe8cf2f
Adding git refresh command to kll.cmake and kll file listing to build process
Jacob Alexander <haata@kiibohd.com>
parents:
205
diff
changeset
|
34 ) |
205
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
35 endif () # kll/kll.py exists |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
36 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
37 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
38 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
39 ### |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
40 # Prepare KLL layout arguments |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
41 # |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
42 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
43 #| KLL_DEPENDS is used to build a dependency tree for kll.py, this way when files are changed, kll.py gets re-run |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
44 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
45 #| Search for capabilities.kll in each module directory |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
46 foreach ( DIR ${ScanModulePath} ${MacroModulePath} ${OutputModulePath} ${DebugModulePath} ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
47 # capabilities.kll exists, add to BaseMap |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
48 set ( filename "${PROJECT_SOURCE_DIR}/${DIR}/capabilities.kll" ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
49 if ( EXISTS ${filename} ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
50 set ( BaseMap_Args ${BaseMap_Args} ${filename} ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
51 set ( KLL_DEPENDS ${KLL_DEPENDS} ${filename} ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
52 endif () |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
53 endforeach () |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
54 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
55 #| If set BaseMap cannot be found, use default map |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
56 set ( pathname "${PROJECT_SOURCE_DIR}/${ScanModulePath}" ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
57 if ( NOT EXISTS "${filename}/${BaseMap}.kll" ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
58 set ( BaseMap_Args ${BaseMap_Args} ${pathname}/defaultMap.kll ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
59 set ( KLL_DEPENDS ${KLL_DEPENDS} ${pathname}/defaultMap.kll ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
60 else () |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
61 set ( BaseMap_Args ${BaseMap_Args} ${pathname}/${BaseMap}.kll ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
62 set ( KLL_DEPENDS ${KLL_DEPENDS} ${pathname}/${BaseMap}.kll ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
63 endif () |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
64 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
65 #| Configure DefaultMap if specified |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
66 if ( NOT "${DefaultMap}" STREQUAL "" ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
67 set ( DefaultMap_Args -d ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
68 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
69 string ( REPLACE " " ";" MAP_LIST ${DefaultMap} ) # Change spaces to semicolons |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
70 foreach ( MAP ${MAP_LIST} ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
71 # Check if kll file is in build directory, otherwise default to layout directory |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
72 if ( EXISTS "${PROJECT_BINARY_DIR}/${MAP}.kll" ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
73 set ( DefaultMap_Args ${DefaultMap_Args} ${MAP}.kll ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
74 set ( KLL_DEPENDS ${KLL_DEPENDS} ${MAP}.kll ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
75 else () |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
76 set ( DefaultMap_Args ${DefaultMap_Args} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP}.kll ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
77 set ( KLL_DEPENDS ${KLL_DEPENDS} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP}.kll ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
78 endif () |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
79 endforeach () |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
80 endif () |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
81 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
82 #| Configure PartialMaps if specified |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
83 if ( NOT "${PartialMaps}" STREQUAL "" ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
84 # For each partial layer |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
85 foreach ( MAP ${PartialMaps} ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
86 set ( PartialMap_Args ${PartialMap_Args} -p ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
87 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
88 # Combine each layer |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
89 string ( REPLACE " " ";" MAP_LIST ${MAP} ) # Change spaces to semicolons |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
90 foreach ( MAP_PART ${MAP_LIST} ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
91 # Check if kll file is in build directory, otherwise default to layout directory |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
92 if ( EXISTS "${PROJECT_BINARY_DIR}/${MAP_PART}.kll" ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
93 set ( PartialMap_Args ${PartialMap_Args} ${MAP_PART}.kll ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
94 set ( KLL_DEPENDS ${KLL_DEPENDS} ${MAP_PART}.kll ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
95 else () |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
96 set ( PartialMap_Args ${PartialMap_Args} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP_PART}.kll ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
97 set ( KLL_DEPENDS ${KLL_DEPENDS} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP_PART}.kll ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
98 endif () |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
99 endforeach () |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
100 endforeach () |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
101 endif () |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
102 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
103 |
206
c6a90fe8cf2f
Adding git refresh command to kll.cmake and kll file listing to build process
Jacob Alexander <haata@kiibohd.com>
parents:
205
diff
changeset
|
104 #| Print list of layout sources used |
c6a90fe8cf2f
Adding git refresh command to kll.cmake and kll file listing to build process
Jacob Alexander <haata@kiibohd.com>
parents:
205
diff
changeset
|
105 message ( STATUS "Detected Layout Files:" ) |
c6a90fe8cf2f
Adding git refresh command to kll.cmake and kll file listing to build process
Jacob Alexander <haata@kiibohd.com>
parents:
205
diff
changeset
|
106 foreach ( filename ${KLL_DEPENDS} ) |
c6a90fe8cf2f
Adding git refresh command to kll.cmake and kll file listing to build process
Jacob Alexander <haata@kiibohd.com>
parents:
205
diff
changeset
|
107 message ( "${filename}" ) |
c6a90fe8cf2f
Adding git refresh command to kll.cmake and kll file listing to build process
Jacob Alexander <haata@kiibohd.com>
parents:
205
diff
changeset
|
108 endforeach () |
c6a90fe8cf2f
Adding git refresh command to kll.cmake and kll file listing to build process
Jacob Alexander <haata@kiibohd.com>
parents:
205
diff
changeset
|
109 |
c6a90fe8cf2f
Adding git refresh command to kll.cmake and kll file listing to build process
Jacob Alexander <haata@kiibohd.com>
parents:
205
diff
changeset
|
110 |
205
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
111 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
112 ### |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
113 # Run KLL Compiler |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
114 # |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
115 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
116 #| KLL Options |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
117 set ( kll_backend -b kiibohd ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
118 set ( kll_template -t ${PROJECT_SOURCE_DIR}/kll/templates/kiibohdKeymap.h ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
119 set ( kll_outputname generatedKeymap.h ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
120 set ( kll_output -o ${kll_outputname} ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
121 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
122 #| KLL Cmd |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
123 set ( kll_cmd ${PROJECT_SOURCE_DIR}/kll/kll.py ${BaseMap_Args} ${DefaultMap_Args} ${PartialMap_Args} ${kll_backend} ${kll_template} ${kll_output} ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
124 add_custom_command ( OUTPUT ${kll_outputname} |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
125 COMMAND ${kll_cmd} |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
126 DEPENDS ${KLL_DEPENDS} |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
127 COMMENT "Generating KLL Layout" |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
128 ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
129 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
130 #| Append generated file to required sources so it becomes a dependency in the main build |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
131 set ( SRCS ${SRCS} ${kll_outputname} ) |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
132 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
133 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
134 |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
135 endif () # PartialMap |
a2e9bb170eef
Adding CMake build support for the KLL compiler
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
136 |