Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - starach

Pages: [1]
1
General / Re: SFML 2.5 CMake Migration
« on: August 10, 2019, 02:02:52 am »
IDE: CLion
System: Windows 10
SFML: 3.5.1 downloaded from https://www.sfml-dev.org/files/SFML-2.5.1-windows-gcc-7.3.0-mingw-64-bit.zip

I've unzipped the package to <project>/library/frameworks/ and used the CMakeLists.txt below but got:
The following configuration files were considered but not accepted
C:/projects/sfml/./library/frameworks/SFML-2.5.1/lib/cmake/SFML/SFMLConfig.cmake, version: 2.5.1 (64bit)

cmake_minimum_required(VERSION 3.14)
project(sfml)

set(CMAKE_CXX_STANDARD 11)

# SFML
## If you want to link SFML statically
set(SFML_STATIC_LIBRARIES TRUE)

## In most cases better set in the CMake cache
set(SFML_DIR "./library/frameworks/SFML-2.5.1/lib/cmake/SFML")

find_package(SFML 2.5 COMPONENTS system window graphics network audio REQUIRED)
add_executable(sfml main.cpp)
target_link_libraries(sfml sfml-system sfml-window sfml-graphics sfml-network sfml-audio)
 

Pages: [1]
anything