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 - andraantariksa

Pages: [1]
1
General / How to setup CMake in Visual Studio?
« on: October 10, 2020, 02:44:17 pm »
So far, I have create this CMakeLists.txt

Quote
cmake_minimum_required (VERSION 3.8)

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?

Pages: [1]
anything