CMake Target_Link_Libraries fails
I know this topic already has been discussed more than once, but I do not
understand what is going wrong. I looked up several websites but none of
the provided approaches worked for me.
I want to create a VS solution with CMake which consists of 10 projects.
Each project has to link myLibrary.lib.
This is what I tried so far:
INCLUDE_DIRECTORIES( "inc" ) # OK, tested and works
LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/lib) # OK, tested and works
ADD_EXECUTABLE(${BINNAME} ${SRCS}) # ?No idea?
TARGET_LINK_LIBRARIES(${BINNAME} myLibrary.lib) # fails
The error I'm getting is: "SHAREDLIB:SHAREDLIB-NOTFOUND"
So again, I want to add this library to any project in this solution.
My folders are something like:
C++\
inc\ -> header files
lib\ -> libraries
src\ -> sources
I'm using CMake 2.8 and VS 2010.
No comments:
Post a Comment