1
General / Re: Program immediate closes
« on: March 05, 2017, 03:44:52 am »
I was wrong, it's the sfml libraries that were failing.
I copied and pasted a cmake file from some tutorial and it worked, there must have been some small mistake that I missed.
Edit: Never mind, still not working.
Edit: Never mind, still not working.
cmake_minimum_required(VERSION 3.2)
project(SFMLDemo)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
add_executable(SFMLDemo ${SOURCE_FILES})
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
find_package(SFML REQUIRED system window graphics network audio)
if (SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(SFMLDemo ${SFML_LIBRARIES})
endif()
project(SFMLDemo)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
add_executable(SFMLDemo ${SOURCE_FILES})
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
find_package(SFML REQUIRED system window graphics network audio)
if (SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(SFMLDemo ${SFML_LIBRARIES})
endif()