将SFML从cmake的依赖项改为git的依赖项
This commit is contained in:
parent
77d2d45b20
commit
781e62f041
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "deps/SFML"]
|
||||||
|
path = deps/SFML
|
||||||
|
url = https://github.com/SFML/SFML.git
|
|
@ -3,11 +3,7 @@ project(SFTK LANGUAGES CXX)
|
||||||
|
|
||||||
set(CXX_STANDARD_REQUIRED 23)
|
set(CXX_STANDARD_REQUIRED 23)
|
||||||
|
|
||||||
include(FetchContent)
|
add_subdirectory(./deps/SFML)
|
||||||
FetchContent_Declare(SFML
|
|
||||||
GIT_REPOSITORY https://github.com/SFML/SFML.git
|
|
||||||
GIT_TAG 2.6.x)
|
|
||||||
FetchContent_MakeAvailable(SFML)
|
|
||||||
|
|
||||||
set(ROOT src/)
|
set(ROOT src/)
|
||||||
set(CONTAINER src/containers)
|
set(CONTAINER src/containers)
|
||||||
|
|
Binary file not shown.
|
@ -5,8 +5,9 @@
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
auto &window = sftk::Window::create(800, 600, L"demo1");
|
auto &window = sftk::Window::create(800, 600, L"demo1");
|
||||||
auto &label = sftk::Label::create(L"hello SFTK.", sftk::Font("SarasaUiSC-Regular.ttf", "", 18));
|
window.setBackgroudColor(sf::Color::White);
|
||||||
label.setColor(sf::Color::White);
|
auto &label = sftk::Label::create(L"hello SFTK.", sftk::Font("../demo/SarasaUiSC-Regular.ttf", "", 18));
|
||||||
|
label.setColor(sf::Color::Black);
|
||||||
label.setPosition(vec(100.f, 100.f));
|
label.setPosition(vec(100.f, 100.f));
|
||||||
window.exec();
|
window.exec();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 69ea0cd863aed1d4092b970b676924a716ff718b
|
Loading…
Reference in New Issue