-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from AlpineMapsOrg/cmake_rework
Cmake rework
- Loading branch information
Showing
37 changed files
with
128 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/CMakeLists.txt.user | ||
/extern/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
[submodule "sherpa"] | ||
path = sherpa | ||
url = [email protected]:AlpineMapsOrg/sherpa.git | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,54 @@ | ||
cmake_minimum_required(VERSION 3.21) | ||
cmake_minimum_required(VERSION 3.24) | ||
project(alpine-renderer-nucleus LANGUAGES CXX) | ||
|
||
option(ALP_AUTOUPDATE_RADIX "Keeps whack up-to-date with origin/main, but prevents local edits. Change to OFF if you want to edit radix" TRUE) | ||
|
||
include(FetchContent) | ||
|
||
if(ALP_AUTOUPDATE_RADIX) | ||
FetchContent_Declare(radix | ||
GIT_REPOSITORY https://github.com/AlpineMapsOrg/radix.git | ||
GIT_TAG origin/main | ||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/radix | ||
SOURCE_SUBDIR src | ||
) | ||
FetchContent_MakeAvailable(radix) | ||
else() | ||
if (NOT EXISTS ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/radix) | ||
FetchContent_Declare(radix | ||
GIT_REPOSITORY [email protected]:AlpineMapsOrg/radix.git | ||
GIT_TAG main | ||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/radix | ||
) | ||
FetchContent_MakeAvailable(radix) | ||
else() | ||
add_subdirectory(${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/radix ${CMAKE_BINARY_DIR}/_deps/radix-build) | ||
endif() | ||
endif() | ||
|
||
message("###################ALP_EXTERN_DIR = ${ALP_EXTERN_DIR}") | ||
set(EXPECTED_BUILD_TESTS OFF CACHE BOOL "Enable tl::expected tests") | ||
FetchContent_Declare(tl_expected | ||
URL https://github.com/TartanLlama/expected/archive/refs/tags/v1.1.0.zip | ||
URL_HASH MD5=cbc9465bb0e9328c821fc3cf89ec7711 | ||
DOWNLOAD_EXTRACT_TIMESTAMP true | ||
URL https://github.com/TartanLlama/expected/archive/refs/tags/v1.1.0.zip | ||
URL_HASH MD5=cbc9465bb0e9328c821fc3cf89ec7711 | ||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/tl_expected | ||
) | ||
FetchContent_MakeAvailable(tl_expected) | ||
FetchContent_Declare(fmt | ||
DOWNLOAD_EXTRACT_TIMESTAMP true | ||
URL https://github.com/fmtlib/fmt/releases/download/10.1.0/fmt-10.1.0.zip | ||
URL_HASH MD5=56eaffa1e2a2afe29e9cb2348a446e63 | ||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/fmt | ||
) | ||
FetchContent_Declare(zppbits | ||
DOWNLOAD_EXTRACT_TIMESTAMP true | ||
URL https://github.com/eyalz800/zpp_bits/archive/refs/heads/main.zip | ||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/zppbits | ||
) | ||
FetchContent_MakeAvailable(tl_expected fmt zppbits) | ||
|
||
add_library(zppbits INTERFACE) | ||
target_include_directories(zppbits INTERFACE ${zppbits_SOURCE_DIR}) | ||
|
||
qt_add_library(nucleus STATIC | ||
AbstractRenderWindow.h AbstractRenderWindow.cpp | ||
|
@@ -59,7 +99,7 @@ qt_add_library(nucleus STATIC | |
) | ||
|
||
target_include_directories(nucleus PRIVATE . PUBLIC ${CMAKE_SOURCE_DIR}) | ||
target_link_libraries(nucleus PUBLIC sherpa Qt::Core Qt::Gui Qt::Network Qt::Svg fmt::fmt zppbits expected) | ||
target_link_libraries(nucleus PUBLIC radix Qt::Core Qt::Gui Qt::Network Qt::Svg fmt::fmt zppbits expected) | ||
|
||
|
||
if (EMSCRIPTEN) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
|
||
#include <QObject> | ||
|
||
#include <sherpa/tile.h> | ||
#include <radix/tile.h> | ||
|
||
class QTimer; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
|
||
#include <QObject> | ||
|
||
#include <sherpa/tile.h> | ||
#include <radix/tile.h> | ||
|
||
#include "tile_types.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule sherpa
deleted from
eaf6c6
Oops, something went wrong.