What is line 49 of your CMakeLists file...? The output indicates it has a
command on it that yields the error...
On Aug 12, 2011, at 9:55 PM, Doug douglas.lin...@gmail.com wrote:
I see.
I've tried this approach and I get the error:
-- Found LIBPNG
CMake Error at CMakeLists.txt:49
If the projects are independent, you might want to take a look at this
Wiki page:
http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file.
HTH
Michael
___
Powered by www.kitware.com
Visit other Kitware open-source
I'm sorry if I'm being dumb here, but I fail to see how that helps.
That example is one where foobar depends explicitly on foo and bar.
What if foo depends on bar2?
How do I inherit that dependency from foo in foobar?
_that's_ what I'm looking for.
(If that example somehow explains that, I'm
On Fri 12 Aug 2011 10:49:45 AM CEST, Doug wrote:
I'm sorry if I'm being dumb here, but I fail to see how that helps.
That example is one where foobar depends explicitly on foo and bar.
What if foo depends on bar2?
How do I inherit that dependency from foo in foobar?
_that's_ what
On 12.08.11 16:48:09, Doug wrote:
why?
I've invoked:
find_package(liba REQUIRED)
not:
find_package(libpng REQUIRED)
My application has no knowledge about libpng, or libjpg or whatever the heck
else liba uses to load images.
I might have misinterpreted what you wrote so far, but
I see.
I've tried this approach and I get the error:
-- Found LIBPNG
CMake Error at CMakeLists.txt:49 (export):
export given target /usr/lib/libpng.so which is not built by this
project.
-- Configuring incomplete, errors occurred!
~
Doug.
On Fri, Aug 12, 2011 at 4:57 PM, Michael Wild
Hrm... this seems like something cmake should be able to do, but I don't
know how to make it work.
If I have library A, that depends on a library and an executable project
that depends on library A, how can the executable project resolve the sub
dependencies from A?
Specifically libpng in my
Add the sub dependencies that library A has with target_link_libraries():
target_link_libraries(A png)
--
Glenn
On 11 August 2011 10:02, Doug douglas.lin...@gmail.com wrote:
Hrm... this seems like something cmake should be able to do, but I don't
know how to make it work.
If I have
How can I achieve that _without_ editing my own cmake file?
What if a swap in a different library for my executable that is abi
compatible but uses a different implemented to load images?
I'm not talking hypotheticals here: I literally have two versions of the
library that use slightly different
The target_link_libraries() command would be in the CMakeLists.txt for
library A, not the one for your executable. The one for your executable
would just say target_link_libraries(myExe A). And cmake would
automatically know that linking with A also means linking with png.
You say that you have
That works if it's all in a single project, but it's not.
I totally understand you can do this:
add_library(foo)
target_link_library(foo bar)
add_executable(exec)
target_link_library(exec foo)
If you have _this_ structure:
.../liba/CMakeLists.txt
.../blah/libb/CMakeLists.txt
In the vague hopes that using add_subdirectory() will magically fix things
I've changed the structure to be along the lines of:
exec/CMakeLists.txt
exec/cmake/Modules/Findliba.cmake
exec/deps/liba/CMakeLists.txt
exec/deps/liba/cmake/Modules/Findlibb.cmake
exec/deps/liba/deps/libb/CMakeLists.txt
12 matches
Mail list logo