I am generating a VisualStudio project for Windows with cmake and the provided linking functions don't appear to work on the generated VisualStudio project.
The generated project is a library and it relies on another library as a dependency.
Generation of the project works fine but nothing appears under "Additional Dependencies" entry whatever i try.
I tried using both "link_libraries" and "target_link_libraries", both before and after stating "add_library( MyLib )" I tried this for instance:
project( MyLib )
...
add_library( MyLib ${source_list} )
...
target_link_libraries ( MyLib ${SOME_LIB_PATH} )
target_link_libraries ( MyLib "${SOME_LIB_PATH}" )
target_link_libraries ( MyLib W:/work/Project/MyLib/ )
target_link_libraries ( MyLib "W:/work/Project/MyLib/" )
target_link_libraries ( MyLib W:/work/Project/MyLib/MyLib.lib )
target_link_libraries ( MyLib "W:/work/Project/MyLib/MyLib.lib" )
target_link_libraries ( MyLib banane )
target_link_libraries ( MyLib whatever )
target_link_libraries ( MyLib "test" )
...
include_directories(
"Include/"
${SOME_LIB_INCLUDE_PATH}
)
Include directories appear correctly in the project properties though. So is that a bug or am i missing something :) ?
MyLibdedicated to become a static library or a DLL? (There should be another setting in CMake to determine this but it's not exposed and I don't remember if there are defaults and which.) - Scheff's CatBUILD_SHARED_LIBSand couldn't find any. Oops. (Conditions using it, but no definition.) Then I looked into the VS project of a lib and, really, it's built as static lib. That was not intended (though it doesn't bother - code is written to work in both cases). Btw. I looked into the dependencies (of that lib depending on Qt) and yes, I can confirm, no additional dependencies (as they are not needed - as I explained above). - Scheff's Cat