Closed robiwano closed 6 years ago
Just merged this PR, but made some changes in https://github.com/eidheim/tiny-process-library/commit/83854cd703ba647c9b7a0151e36ef1d40b3e4a33. Let me know if this looks good and work out in your use case. I went with checking CMAKE_SOURCE_DIR
against CMAKE_CURRENT_SOURCE_DIR
since this was easy to read. But thank you for the stackoverflow link.
I also removed the install targets if TPL is a sub-project (https://github.com/eidheim/tiny-process-library/commit/91bd0e90debea4fd747aba708d494df34a8ce0f2)
I don't think that's a good idea: If it's used as a subproject, you might want to install the parent project which also needs to install it.
I don't agree, I think it's good. Since TPL is a static library, in the case of it being used in a parent project there isn't really anything to install ? If it were a shared library I would agree.
Yeah, nevermind: as it doesn't export the targets installation isn't useful anyway.
I also modernised the CMakeLists.txt further here: https://github.com/eidheim/tiny-process-library/commit/5e6d16b3b6080d6cdee2da39b2b6e35042de02be. Let me know if I messed up:)
I just committed yet another cleanup of CMakeLists.txt in https://github.com/eidheim/tiny-process-library/commit/4c4f1c68e90423e0b43091deeebcdb6c0fc02fb2.
…in CMake, also adds target_include_directories so include dirs get propagated properly to dependent targets.