Thanks for your generous Mr. Atkins, what you answer me worked well and
solved my question. I would keep 'always use target names in a
CMakeLists.txt instead of the actual output file' in my mind. :-)
Chao
Chuck Atkins wrote
> Hi Chao,
>
> You want to let CMake to as much of the work for you as
It seems CMakw could not find the generated moc_xxx files. I modified the
scripts to specify moc_xxx files is generated, but it still has same errors.
ADD_CUSTOM_COMMAND ( OUTPUT ${Qt_tmp}/moc_GMWindow.cpp
COMMAND ${QT_MOC_CMD} ${GM_DIR}/GMWindow.h -o
${Qt_tmp}/moc_GMWindow.c
Thank you for your answer!
> > How do I resolve something like this? Right now CMake evaluates the
> > compiler includes in the order that subdirectories are added. This
> > gives me an compilation error in uart.c that terminal.h cannot be
> > found.
>
> This is not a cmake-problem, but seems to
Hi Chao,
You want to let CMake to as much of the work for you as possible. You're
still trying to explicitly pass the path to the library file to
target_link_libraries. If you look at the line:
target_link_library(exe1 "-Wl, --whole-archive ../sub_dir1/liblib1.a
--no-whole-archive")
there's no