cmake_minimum_required(VERSION 2.8.11)

project(TrianglesReborn)

# Linker options
set(CMAKE_LDFLAGS "${CMAKE_LDFLAGS}  ")

# Library path
set(CMAKE_LDFLAGS "${CMAKE_LDFLAGS} -L\".\" -L\"/usr/lib\" ")

# Define the CXX sources
set ( CXX_SRCS
    src/main.cpp
    src/Triangles.cpp
    src/Input.cpp
    src/IngameState.cpp
    src/Assets.cpp
    src/MenuState.cpp
    src/Triangle.cpp
    src/Player.cpp
    src/Foreground.cpp
    src/GuiTriangle.cpp
    src/Camera.cpp
    src/State.cpp
    src/TrianglesWindow.cpp
    src/Bullet.cpp
    src/Collidable.cpp
    src/Utility.cpp
    src/GuiButton.cpp
    src/Particle.cpp
    ltbl/tools/Math.cpp
    ltbl/lighting/LightSystem.cpp
    ltbl/lighting/LightPointEmission.cpp
    ltbl/lighting/LightDirectionEmission.cpp
    ltbl/quadtree/StaticQuadtree.cpp
    ltbl/quadtree/QuadtreeOccupant.cpp
    ltbl/quadtree/QuadtreeNode.cpp
    ltbl/quadtree/Quadtree.cpp
    ltbl/quadtree/DynamicQuadtree.cpp
    src/Circle.cpp
    src/Wormhole.cpp
    src/Lantern.cpp
    src/Star.cpp
)

set_source_files_properties(
    ${CXX_SRCS} PROPERTIES COMPILE_FLAGS 
    "-O3 -std=c++11")

add_executable(TrianglesReborn ${CXX_SRCS} ${C_SRCS})

target_link_libraries(TrianglesReborn
    sfml-system
    sfml-window
    sfml-graphics
    sfml-audio
    pthread
    X11
)

