From 624964150348a079a37105d16a62145d625f6720 Mon Sep 17 00:00:00 2001 From: Mateja Date: Sat, 20 Feb 2021 14:21:18 +0100 Subject: Remove unnecessary CMake functions. --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e8e8210..22c21d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,8 +33,6 @@ endif() # 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 -- cgit v1.2.3 From 4a9c75233dc0faebf625011a52f7db354e7c1417 Mon Sep 17 00:00:00 2001 From: Mateja Date: Sat, 20 Feb 2021 14:22:56 +0100 Subject: Build only necessary SFML libraries. --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22c21d2..7722d89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,14 @@ 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) + # Compile and add SFML to project add_subdirectory(external/SFML) target_link_libraries(${PROJECT_NAME} sfml-graphics sfml-window sfml-system) -- cgit v1.2.3 From 45cf33be84c9227ef4a9648e4acd243fb68f88b6 Mon Sep 17 00:00:00 2001 From: Mateja Date: Sat, 20 Feb 2021 14:25:56 +0100 Subject: Don't use shared libraries. Fixes #5 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7722d89..9ed7983 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,9 @@ 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_link_libraries(${PROJECT_NAME} sfml-graphics sfml-window sfml-system) -- cgit v1.2.3