Skip to content

Commit

Permalink
Switched from GGG to Qt6: current demo just draws a single triangle
Browse files Browse the repository at this point in the history
  • Loading branch information
denizdiktas committed Jun 5, 2023
1 parent 2864d74 commit cbafb4e
Show file tree
Hide file tree
Showing 4 changed files with 414 additions and 572 deletions.
56 changes: 32 additions & 24 deletions Arrangement_on_surface_2/demo/earth/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
# Projects Settings
cmake_minimum_required (VERSION 3.1)
#set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} )
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

project (earth)
cmake_minimum_required(VERSION 3.16)
project(earth LANGUAGES CXX)

# The main executable
add_executable(earth
main.cpp
)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()

set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/earth")

find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL OpenGLWidgets Widgets)

find_package(OpenGL REQUIRED)
qt_standard_project_setup()

find_package(GLM REQUIRED)
include_directories(${GLM_INCLUDE_DIRS})
link_libraries(${GLM_LIBRARIES})
qt_add_executable(earth
main.cpp
mainwidget.cpp mainwidget.h
)

find_package(GLFW REQUIRED)
include_directories(${GLFW_INCLUDE_DIR})
link_directories(${GLFW_LIBRARY})
set_target_properties(earth PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE")

find_package(GLEW REQUIRED)
include_directories(${GLEW_INCLUDE_DIRS})
link_libraries(${GLEW_LIBRARIES})
target_link_libraries(earth PRIVATE
Qt6::Core
Qt6::Gui
Qt6::OpenGL
Qt6::OpenGLWidgets
Qt6::Widgets
)


target_link_libraries(earth
opengl32
glu32
glfw3
GLEW::GLEW
glm::glm
install(TARGETS earth
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
Loading

0 comments on commit cbafb4e

Please sign in to comment.