cmake_minimum_required(VERSION 3.15) project(Toupies_DL) ADD_DEFINITIONS(-std=c++14 ) set(CMAKE_CXX_STANDARD 14) find_package(Qt5 COMPONENTS Widgets Core Gui Multimedia REQUIRED) find_package(Qt5OpenGL REQUIRED) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) add_definitions(${QT_DEFINITIONS}) include_directories(headers) include_directories(source) set(FILES source/constantes.cpp source/Integrable.cpp source/Integrateur.cpp source/Matrice3.cpp source/Toupie.cpp source/Vecteur.cpp source/Systeme.cpp source/Dessinable.cpp source/ConeSimple.cpp source/TextViewer.cpp source/Tests/Bille.cpp source/Tests/Oscillateur.cpp) set(TEST_FILES source/constantes.cpp source/Tests/TestMatrice.cpp source/Tests/Unittest.cpp source/Matrice3.cpp source/Tests/testAll.cpp source/Tests/TestVecteur.cpp source/Vecteur.cpp headers/Tests/TestIntegrateur.h source/Tests/TestIntegrateur.cpp source/Integrable.cpp source/Integrateur.cpp source/Tests/Bille.cpp source/Tests/Oscillateur.cpp source/Tests/testSysteme.cpp headers/Clonable.h) set(QtFILES ex_05/Qt_GL/glwidget.cc ex_05/Qt_GL/vue_opengl.h ex_05/Qt_GL/vue_opengl.cc ex_05/Qt_GL/resource.qrc ex_05/Qt_GL/fragment_shader.glsl ex_05/Qt_GL/vertex_shader.glsl ex_05/Qt_GL/vertex_shader.h ex_05/Qt_GL/glwidget.h ex_05/general/libgeneral.a ex_05/Qt_GL/qrc_resource.cpp ex_05/general/contenu.cc ex_05/general/contenu.h ex_05/general/support_a_dessin.h ex_05/general/dessinable.h ex_05/Qt_GL/vue_opengl.h) add_executable(Toupies_DL ${FILES} main.cpp) add_executable(testAll ${FILES} ${TEST_FILES}) add_executable(exoa ${FILES} exercice9a.cpp) add_executable(exob ${FILES} exercice9b.cpp) add_executable(ex5 ${QtFILES} ex_05/Qt_GL/main_qt_gl.cc) qt5_use_modules(ex5 Widgets OpenGL) target_link_libraries(ex5 Qt5::Widgets Qt5::Core Qt5::Gui Qt5::Multimedia) target_link_libraries(ex5 Qt5::OpenGL)