Here is my minimal example of below: https://www.dropbox.com/s/7fwsr3sigb60rtw/leveling-test.zip?dl=0
My current project folder structure and relevant CMakeLists content:
leveling
├── CMakeLists.txt: add_subdirectory(deps)
└── deps
├── CMakeLists.txt: add_subdirectory(xml-reading)
└── xml-reading
├── CMakeLists.txt: add_subdirectory(deps)
│ add_library(xml-reading ...)
│ target_include_directories(xml-reading PUBLIC ${CMAKE_CURRENT_LIST_DIR}/deps/tinyxml2)
│ target_link_libraries(xml-reading PUBLIC tinyxml2)
└── deps
├── CMakeLists.txt: add_subdirectory(tinyxml2)
└── tinyxml2
this generates a xml-reading.dll file.
But then the leveling project linker options have /DYNAMICBASE "bin\windows-32\debug\xml-reading.lib" "bin\windows-32\debug\BOBPrimitives.lib" "bin\windows-32\debug\tinyxml2d.lib"
Which yields:
2>LINK : fatal error LNK1104: cannot open file 'bin\windows-32\debug\xml-reading.lib'
What's up?
- I tried adding SHARED to
add_library(xml-reading SHARED ...)
, didn't help - As a workaround I set STATIC at
add_library(xml-reading STATIC ...)
to force it to produce a .lib file - but I'd like to understand what's going on