Hi,

Imported library has scope in the directory in which it is created and
below.

If I want to use this library in parent scope, what should I do?

for example,

top CMakeLists.txt

add_subdirectory(sub)
add_executable(myapp main.cpp)
target_link_libraries(myapp imported_lib)

sub CMakeLists.txt

add_library(imported_lib STATIC IMPORTED)

Thanks for your helping~~
-- 

*CONG MA *
--

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