Created
September 19, 2017 13:42
-
-
Save C0nsultant/3644307812e4ca9bf0d9225f3ffa830a to your computer and use it in GitHub Desktop.
Manually lniking static libraries in CMake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CMAKE_MINIMUM_REQUIRED(VERSION 3.5) | |
PROJECT(Code) | |
ADD_LIBRARY(libmysqlcppconn STATIC IMPORTED) | |
SET_PROPERTY(TARGET libmysqlcppconn PROPERTY IMPORTED_LOCATION /usr/lib/libmysqlcppconn.so.7) | |
ADD_EXECUTABLE(exec main.cpp) | |
TARGET_LINK_LIBRARIES(exec libmysqlcppconn) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment