The point is that a project embedding kirigami as submodule would have
CMAKE_SOURCE_DIR wrong in this case so better use CMAKE_CURRENT_SOURCE_DIR
that will always be correct.
Details
kairo project using kirigami as submodule
Diff Detail
- Repository
- R169 Kirigami
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/CMakeLists.txt | ||
---|---|---|
17 | Sounds like ${kirigami_SOURCE_DIR}/kirigami.qrc would be best. I don't really understand the .. you added though. |
src/CMakeLists.txt | ||
---|---|---|
17 | Well my main problem is when embedding kirigami as submodule in my cmake project, CMAKE_SOURCE_DIR is pointing to my top level source dir, not kirigami' one, so would be better to use a variable that can work on a standalone build of kirigamo or an "embedded" one. So I thought that CMAKE_CURRENT_SOURCE_DIR was ok for this, and since it's refering to a file qrc which is one level upper than the current source dir I used CMAKE_CURRENT_SOURCE_DIR/.. to refer to it. Is there a better way to refer to this file with a cmake variable which would not be impacted by the project kirigami is embedded into ? |
" CMAKE_SOURCE_DIR is pointing to my top level source dir, not kirigami' one, "
> so : qt5_add_resources(RESOURCES ${CMAKE_SOURCE_DIR}/kirigami.qrc) would refer to an incorrect path and then make cmake fails at config time, for any projecting embedding kirigami.
src/CMakeLists.txt | ||
---|---|---|
17 | In my case kirigami_SOURCE_DIR points to /MyProject/3rdparty/kirigami/src and not kirigami top level directory, so I would have to put kirigami_SOURCE_DIR/.. as well. |
my current urls are :
origin git://anongit.kde.org/kirigami.git (fetch)
origin git://anongit.kde.org/kirigami.git (push)