]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Lib/CMake/kll.cmake
Adding convenience build target for testing out kll compiler changes.
[kiibohd-controller.git] / Lib / CMake / kll.cmake
index 92205c024e00de272105b7362c8334e947c1b74a..fe28a09a657abd4bc6a31ab7c31871c984cf179d 100644 (file)
@@ -20,6 +20,8 @@ if ( "${MacroModule}" STREQUAL "PartialMap" )
 #
 
 if ( NOT EXISTS "${PROJECT_SOURCE_DIR}/kll/kll.py" )
+       message ( STATUS "Downloading latest kll version:" )
+
        # Make sure git is available
        find_package ( Git REQUIRED )
 
@@ -27,7 +29,9 @@ if ( NOT EXISTS "${PROJECT_SOURCE_DIR}/kll/kll.py" )
        execute_process ( COMMAND ${GIT_EXECUTABLE} clone https://github.com/kiibohd/kll.git
                WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
        )
-else () # Otherwise attempt to update the repo
+elseif ( REFRESH_KLL ) # Otherwise attempt to update the repo
+       message ( STATUS "Checking for latest kll version:" )
+
        # Clone kll git repo
        execute_process ( COMMAND ${GIT_EXECUTABLE} pull --rebase
                WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/kll
@@ -129,6 +133,12 @@ add_custom_command ( OUTPUT ${kll_outputname}
        COMMENT "Generating KLL Layout"
 )
 
+#| KLL Regen Convenience Target
+add_custom_target ( kll_regen
+       COMMAND ${kll_cmd}
+       COMMENT "Re-generating KLL Layout"
+)
+
 #| Append generated file to required sources so it becomes a dependency in the main build
 set ( SRCS ${SRCS} ${kll_outputname} )