diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-02-26 16:13:02 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-02-26 16:13:02 -0700 |
commit | b208a19331ee52445b48f0e3418437832dadd843 (patch) | |
tree | d842d97fe006bc4b4caf08e33ac64cd441b7b8aa | |
parent | 0c365772122d8fe429eb2029b79b5b2f450fd27c (diff) |
I guess CMake uses .o now instead of .obj?
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rwxr-xr-x | build-aux/lint-bin | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b90d000..c6c7068 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,13 +43,13 @@ function(target_embed_sources arg_compile_target arg_link_target arg_hdrname) set(embed_objs) foreach(embed_src IN LISTS ARGN) add_custom_command( - OUTPUT "${embed_src}.obj" + OUTPUT "${embed_src}.o" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMMAND mkdir -p -- "$<PATH:GET_PARENT_PATH,${CMAKE_CURRENT_BINARY_DIR}/${embed_src}>" && - ${CMAKE_LINKER} -r -b binary -o "${CMAKE_CURRENT_BINARY_DIR}/${embed_src}.obj" "${embed_src}" + ${CMAKE_LINKER} -r -b binary -o "${CMAKE_CURRENT_BINARY_DIR}/${embed_src}.o" "${embed_src}" DEPENDS "${embed_src}" ) - list(APPEND embed_objs "${embed_src}.obj") + list(APPEND embed_objs "${embed_src}.o") endforeach() set_source_files_properties("${embed_objs}" PROPERTIES EXTERNAL_OBJECT true diff --git a/build-aux/lint-bin b/build-aux/lint-bin index 2fe8e4b..85f9015 100755 --- a/build-aux/lint-bin +++ b/build-aux/lint-bin @@ -5,6 +5,7 @@ # SPDX-License-Identifier: AGPL-3.0-or-later set -euE -o pipefail +shopt -s extglob # Output is a series of lines in the format "symbol location size # source". Whitespace may seem silly. @@ -38,10 +39,10 @@ lint_globals() { # resolve `..` components source="$(realpath --canonicalize-missing --no-symlinks -- "$source")" ;; - CMakeFiles/*.dir/*.obj) + CMakeFiles/*.dir/*.@(obj|o)) # CMakeFiles/sbc_harnes_objs.dir/... source="${source#CMakeFiles/*.dir/}" - source="${source%.obj}" + source="${source%.@(obj|o)}" source="${source//__/..}" source="$(realpath --canonicalize-missing --no-symlinks --relative-to="$topdir" -- "$source")" ;; |