mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:57:35 +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:
parent
8384bb138e
commit
f2503b2048
1 changed files with 2 additions and 1 deletions
|
@ -14,7 +14,8 @@ list(APPEND RECOMMENDED_TARGETS
|
||||||
# FIXME: Support specifying component dependencies for utilities (e.g. WebSocket for telws)
|
# FIXME: Support specifying component dependencies for utilities (e.g. WebSocket for telws)
|
||||||
|
|
||||||
foreach(CMD_SRC ${CMD_SOURCES})
|
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)
|
if (CMD_NAME IN_LIST SPECIAL_TARGETS)
|
||||||
set(TARGET_NAME "${CMD_NAME}-bin")
|
set(TARGET_NAME "${CMD_NAME}-bin")
|
||||||
else()
|
else()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue