Posts

Showing posts with the label glfw

CMakeLists C++ Beginner

CMakeLists C++ Beginner I've started playing a little bit with C++ and to make it happen I decided to write a simple game engine. For this purpose, I'm using CLion as my IDE and it works all good but adding libraries is just a nightmare. First I've installed all required libraries like glew, glfw or glm using brew, all went fine. Then I spent almost 2 hours to get it to work on my project. My biggest mystery is the reason why it works, I've worked with build systems in java, python or golang and everything was always clear to me. However, I have no idea why it works the way it works and I'd love to know! Here is my CMakeLists file. cmake_minimum_required(VERSION 3.10) project(untitled2) find_package(GLEW REQUIRED) find_package(GLFW3 REQUIRED) set(CMAKE_CXX_STANDARD 17) add_executable(untitled2 main.cpp) target_link_libraries(untitled2 ${GLEW_LIBRARIES}) target_link_libraries(untitled2 glfw) Now I have a few questions: 1. Why am I able to use GLM library without inc...