[CMake] How to add a libaray for another libaray?

2008-12-09 Thread Kermit Mei
Hello, My project is layout like this: Linux-cmd$ tree . |-- CMakeLists.txt |-- core | |-- CMakeLists.txt | |-- ... ... ... | |-- (Some source files to implement the internal function.) `-- ui |-- CMakeLists.txt |-- ... ... ... |-- (Some source files to impliment the UI) |-- main.cpp

Re: [CMake] How to add a libaray for another libaray?

2008-12-10 Thread James Bigler
There are a couple of things that either you have done wrong or I don't understand. This is how I would implement things: core/CMakeLists.txt SET(SRC_LIST ConfigHolder.cpp DictItem.cpp Reciter.cpp ForgetCurve.cpp Task.cpp Dict.cpp Manager.cpp WordList.cpp) ADD_LIBRARY(core ${SRC_LIST}) ui/CMake

Re: [CMake] How to add a libaray for another libaray?

2008-12-10 Thread Kermit Mei
James Bigler wrote: There are a couple of things that either you have done wrong or I don't understand. This is how I would implement things: core/CMakeLists.txt SET(SRC_LIST ConfigHolder.cpp DictItem.cpp Reciter.cpp ForgetCurve.cpp Task.cpp Dict.cpp Manager.cpp WordList.cpp) ADD_LIBRARY(co