1
General / Clion sfml Cmake error
« on: December 28, 2023, 03:39:27 pm »
i have an error setting up sfml on clion i have posted this before and eXpl0it3r
told me to follow this tutorial here is the link https://edw.is/using-cmake/ i follow it and setup the sfml but
thre is a lot of errors here is the errors
thans for the help
told me to follow this tutorial here is the link https://edw.is/using-cmake/ i follow it and setup the sfml but
thre is a lot of errors here is the errors
====================[ Build | sogfremnmel | Debug ]=============================
"D:\JetBrains\CLion 2023.3.2\bin\cmake\win\x64\bin\cmake.exe" --build C:\Users\yigit\Desktop\projelerim\sogfremnmel\cmake-build-debug --target sogfremnmel -j 18
[0/1] Re-running CMake...
-- Found OpenGL: opengl32 found components: OpenGL
-- Fetching SFML...
CMake Deprecation Warning at cmake-build-debug/_deps/sfml-src/CMakeLists.txt:5 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Error at cmake-build-debug/_deps/sfml-src/cmake/Macros.cmake:46 (add_library):
add_library cannot create target "sfml-system" because another target with
the same name already exists. The existing target is a shared library
created in source directory
"C:/Users/yigit/Desktop/projelerim/sogfremnmel/third_party/SFML/src/SFML/System".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
cmake-build-debug/_deps/sfml-src/src/SFML/System/CMakeLists.txt:89 (sfml_add_library)
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/System/CMakeLists.txt:99 (target_link_libraries):
Attempt to add link library "winmm" to target "sfml-system" which is not
built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at cmake-build-debug/_deps/sfml-src/cmake/Macros.cmake:44 (add_library):
add_library cannot create target "sfml-main" because another target with
the same name already exists. The existing target is a static library
created in source directory
"C:/Users/yigit/Desktop/projelerim/sogfremnmel/third_party/SFML/src/SFML/Main".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
cmake-build-debug/_deps/sfml-src/src/SFML/Main/CMakeLists.txt:17 (sfml_add_library)
CMake Error at cmake-build-debug/_deps/sfml-src/cmake/Macros.cmake:46 (add_library):
add_library cannot create target "sfml-window" because another target with
the same name already exists. The existing target is a shared library
created in source directory
"C:/Users/yigit/Desktop/projelerim/sogfremnmel/third_party/SFML/src/SFML/Window".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
cmake-build-debug/_deps/sfml-src/src/SFML/Window/CMakeLists.txt:228 (sfml_add_library)
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/Window/CMakeLists.txt:230 (target_link_libraries):
Attempt to add link library "sfml-system" to target "sfml-window" which is
not built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/Window/CMakeLists.txt:258 (target_link_libraries):
Attempt to add link library "OpenGL" to target "sfml-window" which is not
built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/Window/CMakeLists.txt:279 (target_link_libraries):
Attempt to add link library "winmm" to target "sfml-window" which is not
built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at cmake-build-debug/_deps/sfml-src/cmake/Macros.cmake:46 (add_library):
add_library cannot create target "sfml-graphics" because another target
with the same name already exists. The existing target is a shared library
created in source directory
"C:/Users/yigit/Desktop/projelerim/sogfremnmel/third_party/SFML/src/SFML/Graphics".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/CMakeLists.txt:93 (sfml_add_library)
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/CMakeLists.txt:97 (target_link_libraries):
Attempt to add link library "sfml-window" to target "sfml-graphics" which
is not built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/CMakeLists.txt:125 (target_link_libraries):
Attempt to add link library "OpenGL" to target "sfml-graphics" which is not
built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
-- Found OpenGL: opengl32
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/CMakeLists.txt:138 (target_link_libraries):
Attempt to add link library "Freetype" to target "sfml-graphics" which is
not built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
-- Configuring incomplete, errors occurred!
ninja: error: rebuilding 'build.ninja': subcommand failed
FAILED: build.ninja
maybe i did not do something i dont know i did what the tutorial says "D:\JetBrains\CLion 2023.3.2\bin\cmake\win\x64\bin\cmake.exe" --build C:\Users\yigit\Desktop\projelerim\sogfremnmel\cmake-build-debug --target sogfremnmel -j 18
[0/1] Re-running CMake...
-- Found OpenGL: opengl32 found components: OpenGL
-- Fetching SFML...
CMake Deprecation Warning at cmake-build-debug/_deps/sfml-src/CMakeLists.txt:5 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Error at cmake-build-debug/_deps/sfml-src/cmake/Macros.cmake:46 (add_library):
add_library cannot create target "sfml-system" because another target with
the same name already exists. The existing target is a shared library
created in source directory
"C:/Users/yigit/Desktop/projelerim/sogfremnmel/third_party/SFML/src/SFML/System".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
cmake-build-debug/_deps/sfml-src/src/SFML/System/CMakeLists.txt:89 (sfml_add_library)
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/System/CMakeLists.txt:99 (target_link_libraries):
Attempt to add link library "winmm" to target "sfml-system" which is not
built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at cmake-build-debug/_deps/sfml-src/cmake/Macros.cmake:44 (add_library):
add_library cannot create target "sfml-main" because another target with
the same name already exists. The existing target is a static library
created in source directory
"C:/Users/yigit/Desktop/projelerim/sogfremnmel/third_party/SFML/src/SFML/Main".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
cmake-build-debug/_deps/sfml-src/src/SFML/Main/CMakeLists.txt:17 (sfml_add_library)
CMake Error at cmake-build-debug/_deps/sfml-src/cmake/Macros.cmake:46 (add_library):
add_library cannot create target "sfml-window" because another target with
the same name already exists. The existing target is a shared library
created in source directory
"C:/Users/yigit/Desktop/projelerim/sogfremnmel/third_party/SFML/src/SFML/Window".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
cmake-build-debug/_deps/sfml-src/src/SFML/Window/CMakeLists.txt:228 (sfml_add_library)
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/Window/CMakeLists.txt:230 (target_link_libraries):
Attempt to add link library "sfml-system" to target "sfml-window" which is
not built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/Window/CMakeLists.txt:258 (target_link_libraries):
Attempt to add link library "OpenGL" to target "sfml-window" which is not
built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/Window/CMakeLists.txt:279 (target_link_libraries):
Attempt to add link library "winmm" to target "sfml-window" which is not
built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at cmake-build-debug/_deps/sfml-src/cmake/Macros.cmake:46 (add_library):
add_library cannot create target "sfml-graphics" because another target
with the same name already exists. The existing target is a shared library
created in source directory
"C:/Users/yigit/Desktop/projelerim/sogfremnmel/third_party/SFML/src/SFML/Graphics".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/CMakeLists.txt:93 (sfml_add_library)
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/CMakeLists.txt:97 (target_link_libraries):
Attempt to add link library "sfml-window" to target "sfml-graphics" which
is not built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/CMakeLists.txt:125 (target_link_libraries):
Attempt to add link library "OpenGL" to target "sfml-graphics" which is not
built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
-- Found OpenGL: opengl32
CMake Error at cmake-build-debug/_deps/sfml-src/src/SFML/Graphics/CMakeLists.txt:138 (target_link_libraries):
Attempt to add link library "Freetype" to target "sfml-graphics" which is
not built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
-- Configuring incomplete, errors occurred!
ninja: error: rebuilding 'build.ninja': subcommand failed
FAILED: build.ninja
thans for the help