mirror of
https://github.com/koloideal/SortLab.git
synced 2026-06-10 10:25:30 +03:00
just
This commit is contained in:
+44
-49
@@ -4,58 +4,48 @@ project(SortLab LANGUAGES CXX)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
SFML
|
||||
GIT_REPOSITORY https://github.com/SFML/SFML.git
|
||||
GIT_TAG 2.6.x
|
||||
GIT_SHALLOW ON
|
||||
EXCLUDE_FROM_ALL
|
||||
SYSTEM
|
||||
find_package(SFML 2.6 COMPONENTS graphics window system audio QUIET)
|
||||
|
||||
if(NOT SFML_FOUND)
|
||||
message(STATUS "SFML not found locally, fetching from GitHub...")
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
SFML
|
||||
GIT_REPOSITORY https://github.com/SFML/SFML.git
|
||||
GIT_TAG 2.6.x
|
||||
GIT_SHALLOW ON
|
||||
EXCLUDE_FROM_ALL
|
||||
SYSTEM
|
||||
)
|
||||
FetchContent_MakeAvailable(SFML)
|
||||
else()
|
||||
message(STATUS "SFML found: ${SFML_DIR}")
|
||||
endif()
|
||||
|
||||
set(SORTLAB_SOURCES
|
||||
src/main.cpp
|
||||
src/App.cpp
|
||||
src/App_audio.cpp
|
||||
src/Array.cpp
|
||||
src/Sorter.cpp
|
||||
src/UI.cpp
|
||||
src/OperationsHistory.cpp
|
||||
src/ProgressMap.cpp
|
||||
src/SortHistory.cpp
|
||||
src/sorters/BubbleSorter.cpp
|
||||
src/sorters/SelectionSorter.cpp
|
||||
src/sorters/InsertionSorter.cpp
|
||||
src/sorters/MergeSorter.cpp
|
||||
src/sorters/QuickSorter.cpp
|
||||
src/sorters/HeapSorter.cpp
|
||||
src/sorters/ShellSorter.cpp
|
||||
src/sorters/RadixSorter.cpp
|
||||
)
|
||||
FetchContent_MakeAvailable(SFML)
|
||||
|
||||
if(WIN32)
|
||||
add_executable(SortLab
|
||||
src/main.cpp
|
||||
src/App.cpp
|
||||
src/App_audio.cpp
|
||||
src/Array.cpp
|
||||
src/Sorter.cpp
|
||||
src/UI.cpp
|
||||
src/OperationsHistory.cpp
|
||||
src/ProgressMap.cpp
|
||||
src/SortHistory.cpp
|
||||
src/sorters/BubbleSorter.cpp
|
||||
src/sorters/SelectionSorter.cpp
|
||||
src/sorters/InsertionSorter.cpp
|
||||
src/sorters/MergeSorter.cpp
|
||||
src/sorters/QuickSorter.cpp
|
||||
src/sorters/HeapSorter.cpp
|
||||
src/sorters/ShellSorter.cpp
|
||||
src/sorters/RadixSorter.cpp
|
||||
assets/app.rc
|
||||
)
|
||||
add_executable(SortLab ${SORTLAB_SOURCES} assets/app.rc)
|
||||
else()
|
||||
add_executable(SortLab
|
||||
src/main.cpp
|
||||
src/App.cpp
|
||||
src/App_audio.cpp
|
||||
src/Array.cpp
|
||||
src/Sorter.cpp
|
||||
src/UI.cpp
|
||||
src/OperationsHistory.cpp
|
||||
src/ProgressMap.cpp
|
||||
src/SortHistory.cpp
|
||||
src/sorters/BubbleSorter.cpp
|
||||
src/sorters/SelectionSorter.cpp
|
||||
src/sorters/InsertionSorter.cpp
|
||||
src/sorters/MergeSorter.cpp
|
||||
src/sorters/QuickSorter.cpp
|
||||
src/sorters/HeapSorter.cpp
|
||||
src/sorters/ShellSorter.cpp
|
||||
src/sorters/RadixSorter.cpp
|
||||
)
|
||||
add_executable(SortLab ${SORTLAB_SOURCES})
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
@@ -64,7 +54,12 @@ endif()
|
||||
|
||||
target_include_directories(SortLab PRIVATE ${CMAKE_SOURCE_DIR}/include)
|
||||
|
||||
target_link_libraries(SortLab PRIVATE sfml-graphics sfml-window sfml-system sfml-audio)
|
||||
target_link_libraries(SortLab PRIVATE
|
||||
sfml-graphics
|
||||
sfml-window
|
||||
sfml-system
|
||||
sfml-audio
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
add_custom_command(TARGET SortLab POST_BUILD
|
||||
|
||||
Reference in New Issue
Block a user