Vincular biblioteca estática usando o CMake
Não consigo pegar a biblioteca${static_library}
para vincular estaticamente usando o CMake. Eu tentei codificar o caminho e tanto quanto eu seiTARGET_LINK_LIBRARIES
deve vincular isso automaticamente.
ADD_LIBRARY(libraryA STATIC ${source_files})
TARGET_LINK_LIBRARIES(libraryA debug ${static_library})
Existe um subprojeto que ligalibraryA
mais tarde na construção
ADD_EXECUTABLE(testA ${test_sources})
TARGET_LINK_LIBRARIES(testA libraryA)
que tem $ {static_library} corretamente vinculado, mas preciso${static_library}
estar diretamente ligadolibraryA
.