Hi,
I am building with cmake + gnu c/c++ (MINGW) under Windows 10. I use add_custom_command to let a program (the name is ‘fluid’) to compiler some other resource files. Like this:
add_custom_command(
OUTPUT “${basename}.cxx” “${basename}.h”
COMMAND fluid -c ${CMAKE_CURRENT_SOURCE_DIR}/${src}
DEPENDS ${src}
MAIN_DEPENDENCY ${src}
)
The program is built by that project.
add_subdirectory(fluid)
set(FLTK_FLUID_EXECUTABLE fluid)
set(FLUID fluid) # export
From here add_custom_command — CMake 3.19.2 Documentation
It says: " If COMMAND
specifies an executable target name (created by the add_executable()
command), it will automatically be replaced by the location of the executable created at build time if either of the following is true:"
The problem I have is that the program is replaces in an relative path, something like this: …/myfolde/fluid.exe, but this can’t be executed in a DOS terminal.
My question is how can I let it in absolute path way?
Regards,
Cean