forked from etc/pineapple-src
31 lines
1.2 KiB
Diff
Executable file
31 lines
1.2 KiB
Diff
Executable file
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()
|
|
|
|
|