Thank you very much for your help. Actually, there are two CMakeLists.txt files in the project I work on. Targets are only defined in one of them. This is the reason why I did not find them. It works fine now! Best regards, Cédric Doucet
----- Mail original ----- > De: "Rolf Eike Beer" <e...@sf-mail.de> > À: cmake@cmake.org > Envoyé: Mercredi 8 Janvier 2014 09:59:06 > Objet: Re: [CMake] Add -lrt at the end of link.txt > > Am 08.01.2014 08:42, schrieb Jakub Zakrzewski: > > Hello, > > I recommend reading some kind of CMake tutorial to get at least the > > basic concepts. In the mean time: > > > > --- CMakeLists.txt --- > > cmake_minimum_required(VERSION 2.8.6) > > project(oci_object_test) > > > > set(ORCLIB_HOME /home/jzakrzewski/local/ocilib/usr/local) > > > > include_directories(${ORCLIB_HOME}/include) > > link_directories(${ORCLIB_HOME}/lib64) > > > > link_directories(/usr/lib/oracle/11.2/client64/lib) > > This is wrong. Don't use link_directories. > > > set(SOURCES > > main.cpp > > ) > > > > add_executable(demo ${SOURCES}) > > target_link_libraries(demo clntsh ocilib) > > --- CMakeLists.txt --- > > Use target_link_libraries() with absolute pathnames to the libraries > you > need. find_library() can help you gathering those. > > Eike > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For > more information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake