1
General discussions / Re: Discord server
« on: May 23, 2021, 01:02:29 pm »
thats great
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.
cmake_minimum_required(VERSION 3.19)
project(sfml_01)
set(CMAKE_CXX_STANDARD 20)
add_executable(sfml_01 src/main.cpp)
include_directories(headers /usr/include C:/SFML/include)
set(SFML_ROOT c:/SFML)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
find_package(SFML 2.5 COMPONENTS system window graphics network audio REQUIRED)
## If you want to link SFML statically
#set(SFML_STATIC_LIBRARIES TRUE)
if (SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(sfml_01 ${SFML_LIBRARIES} ${SFML_DEPENDENCIES})
endif()
# copy images, sound etc ready to be bundled
file(COPY assets DESTINATION ${CMAKE_BINARY_DIR})
# copy DLL's
if (WIN32)
file(GLOB BINARY_DEP_DLLS "${SFML_ROOT}/bin/*.dll")
file(COPY ${BINARY_DEP_DLLS} DESTINATION ${CMAKE_BINARY_DIR})
file(GLOB MINGW_DEP_DLLS "C:/mingw64/bin/*.dll")
file(COPY ${MINGW_DEP_DLLS} DESTINATION ${CMAKE_BINARY_DIR})
endif ()
"C:\Program Files\JetBrains\CLion 2020.3.3\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" C:\projects\Cplusplus\sfml_01
-- Found SFML 2.5.1 in /SFML/include
-- Configuring done
-- Generating done
-- Build files have been written to: C:/projects/Cplusplus/sfml_01/cmake-build-debug
[Finished]
====================[ Build | sfml_01 | Debug ]=================================
"C:\Program Files\JetBrains\CLion 2020.3.3\bin\cmake\win\bin\cmake.exe" --build C:\projects\Cplusplus\sfml_01\cmake-build-debug --target sfml_01 -- -j 9
mingw32-make.exe[3]: *** No rule to make target 'C:/libs/SFML/lib/libsfml-network-d.a', needed by 'sfml_01.exe'. Stop.
# set(SFML_STATIC_LIBRARIES TRUE)