1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:37:45 +00:00

CMake: Allow the names of utilities to contain extensions

Previously, we would remove the "longest extension" from each file name
when parsing it as the name of a utility, which made it impossible for
the names of utilities to contain any extensions.
This commit is contained in:
implicitfield 2024-01-15 20:06:30 +04:00 committed by Andrew Kaster
parent 8384bb138e
commit f2503b2048

View file

@ -14,7 +14,8 @@ list(APPEND RECOMMENDED_TARGETS
# FIXME: Support specifying component dependencies for utilities (e.g. WebSocket for telws)
foreach(CMD_SRC ${CMD_SOURCES})
get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE)
get_filename_component(CMD_NAME_WITH_EXTENSION ${CMD_SRC} NAME)
string(REPLACE ".cpp" "" CMD_NAME ${CMD_NAME_WITH_EXTENSION})
if (CMD_NAME IN_LIST SPECIAL_TARGETS)
set(TARGET_NAME "${CMD_NAME}-bin")
else()