I am starting to CMake, I am creating a project with c ++ and VisualStudio, and after reviewing in several forums and consulting on how to add an external and static library, I have not managed to meet my objective, someone who can be explicit in the process, please . So far tried this:
cmake_minimum_required (VERSION 3.8)
add_executable (FaustOverGL
"FaustOverGL.cpp"
"FaustOverGL.h"
)
target_include_directories(FaustOverGL PUBLIC LibreriasExternas/GLM) # .dll
target_include_directories(FaustOverGL PUBLIC LibreriasExternas/GLFW/include)
#find_library(GLFW NAMES GLFW glfw3 )
#target_link_libraries(FaustOverGL PRIVATE "${GLFW}")
#link_directories(STATIC LibreriasExternas/GLFW/lib-vc2019/glfw3.lib)
#target_link_libraries(FaustOverGL glfw3)
#set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
#set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
#set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
#target_include_directories(FaustOverGL PUBLIC LibreriasExternas/GLFW/include)
#target_link_libraries(FaustOverGL glfw)
install(TARGETS FaustOverGL DESTINATION "FaustOverGL/bin")