aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt13
1 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e8e8210..9ed7983 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,10 +31,19 @@ if(NOT EXISTS "${PROJECT_SOURCE_DIR}/external/SFML/CMakeLists.txt")
message(FATAL_ERROR "The submodules were not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.")
endif()
+# Set SFML variables.
+set(SFML_BUILD_EXAMPLES OFF)
+set(SFML_BUILD_DOC OFF)
+set(SFML_BUILD_AUDIO OFF)
+set(SFML_BUILD_GRAPHICS ON)
+set(SFML_BUILD_WINDOW ON)
+set(SFML_BUILD_NETWORK OFF)
+
+# Don't use shared libraries.
+set(BUILD_SHARED_LIBS OFF)
+
# Compile and add SFML to project
add_subdirectory(external/SFML)
-target_include_directories(${PROJECT_NAME} PUBLIC external/SFML/include)
-target_link_directories(${PROJECT_NAME} PUBLIC external/SFML/lib)
target_link_libraries(${PROJECT_NAME} sfml-graphics sfml-window sfml-system)
# Copy model to build directory