diff options
| author | Jonathan Keller <19418817+NobodyNada@users.noreply.github.com> | 2022-09-30 11:28:46 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-30 20:28:46 +0200 |
| commit | 1c110080a8b8ac080f6ecb9e6c029a9c790bd479 (patch) | |
| tree | e1c0784287f0dfbda6d6cf339b5dedd04a317c3b | |
| parent | 7b67bbe6988d00d557d72c9867b99826320d1835 (diff) | |
| download | box64-1c110080a8b8ac080f6ecb9e6c029a9c790bd479.tar.gz box64-1c110080a8b8ac080f6ecb9e6c029a9c790bd479.zip | |
fix overzealous replace in wrappers pathnames (#415)
Wrapper filenames were generated by replacing ".c" with "_private.h". Unfortunately this matched anywhere in the string, causing problems if the path contained a directory containing the substring ".c". For instance, if box64 is compiled in a '.cache' directory (as AUR helpers like to do, see #144), the directory name was inadvertently mangled into '_private.hache'. Fix this by restricting the match to the end of the string.
| -rwxr-xr-x | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 781943b6..852f0d80 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -454,7 +454,7 @@ set(WRAPPEDS #set(WRAPPEDS_HEAD "${BOX64_ROOT}/src/wrapped/wrappedd3dadapter9_gen.h") foreach(A ${WRAPPEDS}) - string(REPLACE ".c" "_private.h" B ${A}) + string(REGEX REPLACE ".c$" "_private.h" B ${A}) set(WRAPPEDS_HEAD ${WRAPPEDS_HEAD} ${B}) set_source_files_properties(${A} PROPERTIES OBJECT_DEPENDS ${B}) endforeach() |