Im getting started on using CMake and Im wondering if anybody managed to find a way to automatically find the host executables and automatically set the post build command with cmake, so you dont have to do it manually every time after rebuilding.
I tried
# launch FL when on windows, Reaper when on mac
if(WIN32)
find_program(FLSTUDIO_EXE FL64.exe)
if(EXISTS ${FLSTUDIO})
add_custom_command(
TARGET "${PROJECT_NAME}"
POST_BUILD
COMMAND ${FLSTUDIO_PATH})
endif()
elseif(UNIX)
find_program(REAPER Reaper)
add_custom_command(
TARGET "${PROJECT_NAME}"
POST_BUILD
COMMAND ${REAPER})
endif()