]> git.lizzy.rs Git - dragonblocks_alpha.git/commitdiff
Use find_package for freetype rather than a submodule
authorElias Fleckenstein <eliasfleckenstein@web.de>
Fri, 16 Jul 2021 15:29:49 +0000 (17:29 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Fri, 16 Jul 2021 15:29:49 +0000 (17:29 +0200)
.gitmodules
deps/freetype [deleted submodule]
src/CMakeLists.txt

index ac1db55b534a1595e4811cc508d4b98ff201579d..6c23b94f7261fd3c697456f859eba60cca9a347d 100644 (file)
@@ -7,6 +7,3 @@
 [submodule "deps/stb"]
        path = deps/stb
        url = https://github.com/nothings/stb
-[submodule "deps/freetype"]
-       path = deps/freetype
-       url = https://gitlab.freedesktop.org/freetype/freetype.git
diff --git a/deps/freetype b/deps/freetype
deleted file mode 160000 (submodule)
index 685acc0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 685acc04dbad5ece9b7261d21f4a2546d787436c
index 78673209f5a09143944dea544aebe199eafabba8..32aa0e6f8f69499dc46a0ca59ae08ef218b8460c 100644 (file)
@@ -6,6 +6,8 @@ if(NOT CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE Debug)
 endif()
 
+find_package(Freetype REQUIRED)
+
 link_libraries(
        pthread
        m
@@ -20,11 +22,7 @@ include_directories(BEFORE
        ${CMAKE_SOURCE_DIR}
 )
 
-if (MSVC)
-    add_compile_options(/W4 /WX)
-else()
-    add_compile_options(-Wall -Wextra -Wpedantic -Werror)
-endif()
+add_compile_options(-Wall -Wextra -Wpedantic -Werror)
 
 set(SOURCES_COMMON
        array.c
@@ -65,11 +63,11 @@ target_link_libraries(Dragonblocks
        GL
        GLEW
        glfw
-       freetype
+       ${FREETYPE_LIBRARIES}
 )
 
 target_include_directories(Dragonblocks PUBLIC
-       /usr/include/freetype2/
+       ${FREETYPE_INCLUDE_DIRS}
 )
 
 add_executable(DragonblocksServer