Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22113

is there a better way to write a cmakefile? [closed]

$
0
0

so I need help this is my first time writing a cmakeFile.txt file and I wanted to know if there was a better way to "describe/format" it, so it makes more sense as to what it does. this is what I have done and it compiles but it's confusing to read.

project(engine VERSION 0.1.0)set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ../bin)link_directories(${CMAKE_SOURCE_DIR}/lib)find_package(OpenGL REQUIRED)set(LIBS glfw3 opengl32 glew32)set(Engine_HEADERS src/Buffers/buffer.h                   src/Buffers/indexbuffer.h                   src/Buffers/vertexarray.h                   src/Graphics/shader.h                   src/Graphics/window.h                   src/Utils/camera.h                   src/Utils/fileutils.h)set(Engine_SOURCES main.cpp             src/Buffers/buffer.cpp             src/Buffers/indexbuffer.cpp             src/Buffers/vertexarray.cpp             src/Graphics/shader.cpp             src/Graphics/window.cpp             src/Utils/camera.cpp)add_executable(engine ${Engine_SOURCES} ${Engine_HEADERS})target_link_libraries(engine ${LIBS})target_include_directories(engine PRIVATE include/)set(CPACK_PROJECT_NAME ${PROJECT_NAME})set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})

Viewing all articles
Browse latest Browse all 22113

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>