aboutsummaryrefslogtreecommitdiff
path: root/ports/thor/fix-dependency-sfml.patch
blob: 8b6fb09daef90231879c02946f88f98b144bd0af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 03536be..abcff44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -115,11 +115,10 @@ set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules/;${CMAKE_MODULE_PATH
 if(NOT THOR_SHARED_LIBS)
 	set(SFML_STATIC_LIBRARIES TRUE)
 endif()
-find_package(SFML 2 COMPONENTS audio graphics window system)
+find_package(SFML COMPONENTS system window graphics CONFIG REQUIRED)
+set(SFML_LIBRARIES sfml-system sfml-network sfml-graphics sfml-window)
 
-if(SFML_FOUND)
-	include_directories(${SFML_INCLUDE_DIR})
-else()
+if(0)
 	set(SFML_ROOT "" CACHE PATH "SFML top-level directory")
 	message("\n-> SFML directory not found. Set SFML_ROOT to SFML's top-level path (containing \"include\" and \"lib\" directories).")
 	message("-> Make sure the SFML libraries with the same configuration (Release/Debug, Static/Dynamic) exist.\n")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 75e118e..0f90ac8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -72,6 +72,7 @@ else()
 	add_library(${THOR_LIB} STATIC ${THOR_SRC})
 	set_target_properties(${THOR_LIB} PROPERTIES DEBUG_POSTFIX -s-d)
 	set_target_properties(${THOR_LIB} PROPERTIES RELEASE_POSTFIX -s)
+    thor_link_sfml(${THOR_LIB})
 endif()