add spdlog gtest
This commit is contained in:
parent
8a494d7939
commit
c1c0b98b5c
@ -8,18 +8,28 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|||||||
include_directories(${PROJECT_SOURCE_DIR}/include)
|
include_directories(${PROJECT_SOURCE_DIR}/include)
|
||||||
file(GLOB_RECURSE srcs ${PROJECT_SOURCE_DIR}/src/*.cc)
|
file(GLOB_RECURSE srcs ${PROJECT_SOURCE_DIR}/src/*.cc)
|
||||||
|
|
||||||
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
|
include(spdlog)
|
||||||
|
include(gtest)
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
find_package(SFML 2.5 COMPONENTS system window graphics network audio REQUIRED)
|
find_package(SFML 2.5 COMPONENTS system window graphics network audio REQUIRED)
|
||||||
add_executable(${PROJECT_N}
|
add_executable(${PROJECT_N}
|
||||||
main.cc
|
main.cc
|
||||||
${srcs}
|
${srcs}
|
||||||
)
|
)
|
||||||
target_link_libraries(${PROJECT_N}
|
target_link_libraries(${PROJECT_N} PRIVATE
|
||||||
sfml-system
|
sfml-system
|
||||||
sfml-window
|
sfml-window
|
||||||
sfml-graphics
|
sfml-graphics
|
||||||
sfml-network
|
sfml-network
|
||||||
sfml-audio
|
sfml-audio
|
||||||
|
|
||||||
|
spdlog
|
||||||
|
gtest
|
||||||
)
|
)
|
||||||
|
|
||||||
ELSE(WIN32)
|
ELSE(WIN32)
|
||||||
|
2
main.cc
2
main.cc
@ -1,9 +1,11 @@
|
|||||||
#include <SFML/System.hpp>
|
#include <SFML/System.hpp>
|
||||||
#include <SFML/Graphics.hpp>
|
#include <SFML/Graphics.hpp>
|
||||||
#include <SFML/Window.hpp>
|
#include <SFML/Window.hpp>
|
||||||
|
#include <spdlog/spdlog.h>
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char** const argv){
|
int main(int argc, char** const argv){
|
||||||
|
spdlog::info("Hello, World!");
|
||||||
sf::RenderWindow window(sf::VideoMode(800, 600), "mp");
|
sf::RenderWindow window(sf::VideoMode(800, 600), "mp");
|
||||||
sf::Texture texture;
|
sf::Texture texture;
|
||||||
sf::Sprite sprite;
|
sf::Sprite sprite;
|
||||||
|
Loading…
Reference in New Issue
Block a user