Hi everyone,

I am new to cmake, tell me if completely wrong about the way to do.
I have the following source tree :
.
├── algorithms/
│   └── algo1/
│       ├── x.h
│       ├── x.c
│   └── algo2/
│       ├── y.h
│       ├── y.c
├── library/
    └── library.c
    └── liblibrary.a


liblibrary.a is to be linked with algorithms algo1 and algo2.
For now I have the following commands in the CMakeList.txt of each algox/ :
add_library(library STATIC IMPORTED)
set_property(TARGET library PROPERTY IMPORTED_LOCATION ../../library/liblibrary.a)

I would like to set a dependency so whenever I compile algo1 or algo2 liblibrary.a is built.
Can anyone give me a hint ?


Ben.

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to