So far, I have create this CMakeLists.txt
cmake_minimum_required (VERSION 3.
project ("CGA")
set(EXECUTABLE_NAME "cga")
add_executable(${EXECUTABLE_NAME}
CGA.cpp)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
set(SFML_DIR "cmake/")
set(SFML_ROOT "lib/SFML")
set(SFML_STATIC_LIBRARIES TRUE)
find_package(SFML COMPONENTS network audio graphics window system REQUIRED)
target_link_libraries(${EXECUTABLE_NAME}
${SFML_LIBRARIES} ${SFML_DEPENDENCIES})
My directory structure
I get the SFMLConfig.cmake file from the
repository But I'm receiving some error.
I'd like to be able to compile SFML and link it statically with my project using CMake. Can you help me to solve my problem?