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

Pages: [1]
1
My IDE is CLion, using CMake and SFML.
I've been trying to figure this but for whatever reason, my brain is acting like the smoothest sphere you've ever seen.
my project structure is:
MyProject
    sfml
        bin
        include
            SFML
                Audio
                    // various .hpp files
                Graphics
                    // various .hpp files
                Network
                    // various .hpp files
                System
                    // various .hpp files
                Window
                // various .hpp files
        lib
    CMakeLists.txt
    main.cpp
and i have this in my CMakeLists.txt
cmake_minimum_required(VERSION 3.26)
project(byte)
set(CMAKE_CXX_STANDARD 17)
add_executable(MyProject main.cpp)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/sfml/include)
As far as i understand, the include_directories is basically bringing in the header files, but im having trouble with target_link_libraries. i've tried using
target_link_libraries(MyProject ${CMAKE_CURRENT_SOURCE_DIR}/sfml/lib)
but CMake drops that item, saying it may only link to libraries. What is it that i am missing in this?

Pages: [1]
anything