Structure CMakeLists like other examples. Produce a bin in opengl_examples
This commit is contained in:
parent
87d366c2a7
commit
0989efa30f
|
@ -5,15 +5,13 @@ project(OpengGL_Example)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||||
|
|
||||||
add_executable(opengl_example main.cpp)
|
set( NAME_SRC
|
||||||
|
main.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
add_executable( opengl_example ${NAME_SRC} ${NAME_HEADERS} )
|
||||||
|
|
||||||
# Set executable dependency libraries
|
# Set executable dependency libraries
|
||||||
# Equivalent to pass flags -lGL, -lGLU and -lglut
|
# Equivalent to pass flags -lGL, -lGLU and -lglut
|
||||||
target_link_libraries(opengl_example GL GLU glut)
|
target_link_libraries(opengl_example GL GLU glut)
|
||||||
|
|
||||||
# Add target to run executable
|
|
||||||
add_custom_target(run-ex1
|
|
||||||
COMMAND opengl_example
|
|
||||||
DEPENDS opengl_example
|
|
||||||
WORKING_DIRECTORY ${CMAKE_PROJECT_DIR}
|
|
||||||
)
|
|
Loading…
Reference in New Issue