mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:54:58 +00:00
CMake: Replace bespoke utility name mangling logic
Instead of manually removing the '.cpp' extension, we can simply ask CMake to give us the file name without the last extension.
This commit is contained in:
parent
0dca6990b3
commit
e91f60e0f5
1 changed files with 1 additions and 2 deletions
|
@ -14,8 +14,7 @@ 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_WITH_EXTENSION ${CMD_SRC} NAME)
|
get_filename_component(CMD_NAME ${CMD_SRC} NAME_WLE)
|
||||||
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