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
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