简体   繁体   中英

Adding GLFW as a static library to CLion with CMake

i'm trying to add GLFW to my project as a static library and I cannot get it to work, after combing through hours of tutorials and websites. This is currently what my CMakeLists looks like and the file structure.

在此处输入图片说明

Try this:

find_package(glfw3 REQUIRED)
target_link_libraries(Archaic glfw)

Or you can just put glfw source folder into your project, and use add_subdirectory(glfwFolder)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM