Compile and add an object file from a binary with CMake

后端 未结 2 1920
一生所求
一生所求 2020-12-24 14:48

I am writing an Excel file builder in C++.

I have everything I need working, but I still rely on an external empty .xlsx file which I unzip, iterate through, and add

2条回答
  •  Happy的楠姐
    2020-12-24 15:04

    To link the object file into the exectuable, add it to the list of source files in add_executable() instead of trying to add it to target_link_libraries().

    For generating the object file in the first place, see add_custom_command(). In this case, you will want to use its form which specifies an OUTPUT parameter.

提交回复
热议问题