Skip to content

Commit

Permalink
Cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
efifogel committed Sep 20, 2023
1 parent 5df7ed2 commit 5afcc24
Showing 1 changed file with 21 additions and 45 deletions.
66 changes: 21 additions & 45 deletions Arrangement_on_surface_2/demo/earth/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required(VERSION 3.16)
project(earth LANGUAGES CXX)

Expand All @@ -10,30 +7,23 @@ endif()

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

#find_package(shapelib REQUIRED)
find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL OpenGLWidgets Widgets Xml)
add_definitions(-DQT_NO_VERSION_TAGGING)

# CGAL and its components
find_package( CGAL QUIET COMPONENTS )

if ( NOT CGAL_FOUND )
find_package(CGAL QUIET COMPONENTS)

if (NOT CGAL_FOUND)
message(STATUS "This project requires the CGAL library, and will not be compiled.")
return()

endif()


# Boost and its components
find_package( Boost REQUIRED )

if ( NOT Boost_FOUND )
find_package(Boost REQUIRED)

if (NOT Boost_FOUND)
message(STATUS "This project requires the Boost library, and will not be compiled.")

return()

endif()

################################################################################
Expand All @@ -43,36 +33,26 @@ FetchContent_MakeAvailable(json)
# find_package(nlohmann_json 3.2.0 REQUIRED)
################################################################################

set(SHAPELIB_INCLUDE_DIR "" CACHE PATH "DEFINE ME!!!")
#target_include_directories(earth PRIVATE ${SHAPELIB_INCLUDE_DIR})
include_directories(${SHAPELIB_INCLUDE_DIR})
set(SHAPELIB_LIB_DIR "" CACHE PATH "DEFINE ME!!!")
#target_link_directories(earth PRIVATE ${SHAPELIB_LIB_DIR})
link_directories(earth PRIVATE ${SHAPELIB_LIB_DIR})


# AOS
file(GLOB source_files_aos
Aos.h Aos.cpp
Aos_defs.h
Aos_triangulator.h Aos_triangulator.cpp
)
source_group( "Aos" FILES ${source_files_aos} )

)
source_group("Aos" FILES ${source_files_aos})

# GIS
file(GLOB source_files_gis
Kml_reader.h Kml_reader.cpp
Shapefile.h Shapefile.cpp
)
source_group( "GIS" FILES ${source_files_gis} )

)
source_group("GIS" FILES ${source_files_gis})

# GRAPHICS
file(GLOB source_files_graphics
Camera.h Camera.cpp
Shader_program.h Shader_program.cpp
)
)
source_group( "Graphics" FILES ${source_files_graphics} )
# GRAPHICS-GEOMETRY (Graphics-related)
file(GLOB source_files_graphics_geometry
Expand All @@ -82,9 +62,8 @@ file(GLOB source_files_graphics_geometry
Triangles.h Triangles.cpp
Vertices.h Vertices.cpp
World_coordinate_axes.h World_coordinate_axes.cpp
)
source_group( "Graphics_Geometry" FILES ${source_files_graphics_geometry} )

)
source_group("Graphics_Geometry" FILES ${source_files_graphics_geometry})

# GUI
file(GLOB source_files_gui
Expand All @@ -93,10 +72,9 @@ file(GLOB source_files_gui
Camera_manip_rot_bpa.h Camera_manip_rot_bpa.cpp
Camera_manip_zoom.h Camera_manip_zoom.cpp
GUI_country_pick_handler.h GUI_country_pick_handler.cpp
GUI_event_handler.h GUI_event_handler.cpp
GUI_event_handler.h GUI_event_handler.cpp
)
source_group( "GUI" FILES ${source_files_gui} )

source_group("GUI" FILES ${source_files_gui})

#SOURCE FILES (NOT CATEGORIZED YET)
file(GLOB source_files
Expand All @@ -107,21 +85,20 @@ file(GLOB source_files
Timer.h
Tools.h Tools.cpp
Verification.h Verification.cpp
)
source_group( "Source Files" FILES ${source_files} )
)
source_group("Source Files" FILES ${source_files})

qt_standard_project_setup()

qt_add_executable(earth
${source_files_aos}
${source_files_gis}
${source_files_graphics}
${source_files_graphics_geometry}
${source_files_gui}
${source_files}
${source_files_aos}
${source_files_gis}
${source_files_graphics}
${source_files_graphics_geometry}
${source_files_gui}
${source_files}
)


set_target_properties(earth PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
Expand All @@ -145,7 +122,6 @@ target_link_libraries(earth PRIVATE
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/shaders
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})


install(TARGETS earth
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
Expand Down

0 comments on commit 5afcc24

Please sign in to comment.