Hi all,

I've been using openGL with windows for the past few weeks and am trying to do some work on my laptop which runs OSX & uses CMake.

I'm having trouble linking it with CMake and cannot find much online regarding it.

My CMake file is as follows:
Code :
cmake_minimum_required(VERSION 3.8)
project(GFX_Programming_Camera)
 
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8")
 
IF(APPLE)
    INCLUDE_DIRECTORIES ( /System/Library/Frameworks )
    FIND_LIBRARY(GLUT_LIBRARY GLUT )
    FIND_LIBRARY(OpenGL_LIBRARY OpenGL )
    MARK_AS_ADVANCED (
            GLUT_LIBRARY
            OpenGL_LIBRARY)
    SET(EXTRA_LIBS ${GLUT_LIBRARY} ${OpenGL_LIBRARY})
ENDIF (APPLE)
 
 
set(SOURCE_FILES main.cpp Input.cpp Input.h Scene.cpp Scene.h Vector3.cpp Vector3.h Camera.cpp Camera.h)
add_executable(GFX_Programming_Camera ${SOURCE_FILES})
 
target_link_libraries(GFX_Programming_Camera ${GLUT_LIBRARY} ${OpenGL_LIBRARY} ${CMAKE_SOURCE_DIR}/libSOIL.a)


Can anyone please help me out with this?

Thanks!