2012/1/21 <[email protected]>: > Hello > > I am trying to link mysql++ in a lib, with the following cmakelist.txt file: > I get a fatal error: mysql_version.h no such a file or directory > this file is located in usr/include/mysql so I don't understand > thanks in advance if someone can help
May be you simply miss the leading "/" include_directories(usr/include/mysql) --> include_directories(/usr/include/mysql) > project(plibb) > > include_directories(usr/include) > include_directories(usr/include/mysql) > include_directories(usr/include/mysql++) > > add_library(plibb STATIC exec_msg2.cpp cTest2.cpp cDB.cpp) > > target_link_libraries(plibb usr/lib/libmysqlpp.a) > target_link_libraries(plibb usr/lib/libmysqlclient.a) You have a look at find_path and find_library commands. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- 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
