diff options
| author | ilotterytea <iltsu@alright.party> | 2025-04-05 17:25:52 +0400 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-04-05 17:25:52 +0400 |
| commit | a1a36cf4d4999b5ce89dce95364c9fd839b54b5d (patch) | |
| tree | f11e65980852f623d6ce7612691a5af4544e91a1 /CMakeLists.txt | |
| parent | e1d3f72ac38b4dad55d1d02f945e50f086299644 (diff) | |
upd: symlink creation
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b60cb18..268e50d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,16 @@ project( DESCRIPTION "a silly twitch chat bot" ) +function(create_symlink_if_exists source target) + if(EXISTS "${source}") + message(STATUS "Creating symlink ${source} -> ${target}") + execute_process(COMMAND ${CMAKE_COMMAND} -E remove -f "${target}") + execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${source}" "${target}") + else() + message(WARNING "Source '${source}' does not exist. Skipping symlink creation.") + endif() +endfunction() + set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) |
