Skip to content

Commit

Permalink
Lookup Python installation
Browse files Browse the repository at this point in the history
  • Loading branch information
dextercd committed Dec 2, 2022
1 parent 3728b67 commit 8a06ccc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions character_width/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
find_package(Python3 REQUIRED Interpreter)

if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/EastAsianWidth.txt)
file(DOWNLOAD
https://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
Expand All @@ -13,7 +15,7 @@ endif()
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/double_width_table.inc
COMMAND
python3 ${CMAKE_CURRENT_SOURCE_DIR}/generate_double_width_table.py
Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/generate_double_width_table.py
--input ${CMAKE_CURRENT_BINARY_DIR}/EastAsianWidth.txt
--output ${CMAKE_CURRENT_BINARY_DIR}/double_width_table.inc

Expand All @@ -25,7 +27,7 @@ add_custom_command(
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zero_width_table.inc
COMMAND
python3 ${CMAKE_CURRENT_SOURCE_DIR}/generate_zero_width_table.py
Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/generate_zero_width_table.py
--input ${CMAKE_CURRENT_BINARY_DIR}/DerivedGeneralCategory.txt
--output ${CMAKE_CURRENT_BINARY_DIR}/zero_width_table.inc

Expand Down

0 comments on commit 8a06ccc

Please sign in to comment.