Skip to content

Commit c4e6726

Browse files
committed
fix: Use defined variable for xxd command in CMakeLists.txt
1 parent f523507 commit c4e6726

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ include_directories(external/json)
3535
# -----------------------------------------------------------------------------
3636
# Example usage in the project's CMakeLists.txt:
3737
# set(TUIKIT_UI examples/simple_ui.tuik path/to/other_ui.tuik)
38+
find_program(XXD_EXE xxd REQUIRED)
3839
if(NOT DEFINED TUIKIT_UI)
3940
set(TUIKIT_UI "${CMAKE_SOURCE_DIR}/examples/example_2.tuik")
4041
endif()
@@ -47,7 +48,7 @@ foreach(TUIK_FILE ${TUIKIT_UI})
4748
add_custom_command(
4849
OUTPUT ${HEADER_FILE}
4950
COMMAND ${CMAKE_COMMAND} -E make_directory ${TUIK_DIR}
50-
COMMAND xxd -i -n ${VAR_NAME} ${TUIK_FILE} > ${HEADER_FILE}
51+
COMMAND ${XXD_EXE} -i -n ${VAR_NAME} ${TUIK_FILE} > ${HEADER_FILE}
5152
DEPENDS ${TUIK_FILE}
5253
COMMENT "Generating ${HEADER_FILE} from ${TUIK_FILE} with variable ${VAR_NAME}"
5354
VERBATIM

0 commit comments

Comments
 (0)