Closed ANaumann85 closed 3 years ago
@evanmiller or @Alexhuszagh Does this CMake change seem reasonable?
@jmcnamara I am not familiar enough with CMake variables to offer an opinion here.
would further comments or links to the documentation help?
@ANaumann85 Yes. Any additional explanation would be good. I don't really understand what the issue is.
However, it would probably be more helpful to describe the issue that you are having in your project (with some commandline examples if possible) rather than a general explanation of potential issues.
I created a small working example.
The example imports the libxsxwriter as a sub directory and tries to compile a copy of your demo.c. That works fine, as long as one runs cmake only once.
But after a second cmake run, the target for the library xlsxwriter gets another name, the demo looses the relation to the library and therefore it looses the include path to the libxslxwriter.
I would like to add the library in cmake as a subdirectory with a simple
call.
But at the release 1.0.0 (and master too), that does not work directly. Because in your CMakeLists.txt, line 97 the variable "PROJECT_NAME" is set as a cache variable. That means