Closed karamellpelle closed 6 years ago
I suppose this at the end will do the job:
set(ALURE_LIBRARIES alure2 ${alure_libs} CACHE STRING "Dependencies of ALURE")
But better: Add all include and link dependencies of target alure2
with target_include_directories()
and target_link_libraries()
. And for each optional package dependency found (like mpg123), add it to alure2
. Now I have to find these optional packages (i.e. mpg123) by myself again, and then add them to my target.
But better: Add all include and link dependencies of target
alure2
withtarget_include_directories()
andtarget_link_libraries()
. And for each optional package dependency found (like mpg123), add it toalure2
.
This should be the case now. It should also work for alure2_s
(for static linking). Is there anything else it should do to "expose" the alure2
and alure2_s
targets for whatever includes this CMakeLists.txt?
I'm not sure what else the CMakeLists.txt should do; I'm not very into CMake right now.
However, using Alure with the newest commit as a submodule works well. Thank you!
Hello! Is it possible to let ./CMakeLists.txt export
ALURE_LIBRARIES
andALURE_INCLUDE_DIRS
? I have alure as a git submodule and use it as a cmake submodule (add_subdirectory( alure )
). In my top CMakeLists.txt it would be nice to use these variables and not hardcode the paths and link libraries by hand.For example, the submodule glfw of mine makes this possible: