Better cmake

This commit is contained in:
Linus Probert 2017-12-05 12:40:37 +01:00
parent 653e88e201
commit fdb92ef24f
2 changed files with 9 additions and 3 deletions

View File

@ -21,7 +21,7 @@ before_install:
install: install:
- sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev - sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
- sudo apt-get install -y cmake cmake-data check lua5.3 liblua5.3-dev - sudo apt-get install -y cmake cmake-data check lua5.2 liblua5.2-dev
#g++6 #g++6
- if [ "$CXX" = "g++" ]; then sudo apt-get install -y g++-6; fi - if [ "$CXX" = "g++" ]; then sudo apt-get install -y g++-6; fi

View File

@ -4,8 +4,14 @@ SET(CMAKE_COLOR_MAKEFILE ON)
project(breakhack C) project(breakhack C)
include(FindLua)
add_subdirectory(linkedlist) add_subdirectory(linkedlist)
include_directories(linkedlist)
include_directories(linkedlist
${LUA_INCLUDE_DIRS}
)
add_definitions("-Wall") add_definitions("-Wall")
# PROGRAMS: # PROGRAMS:
@ -24,13 +30,13 @@ add_executable(breakhack
target_link_libraries(breakhack target_link_libraries(breakhack
linkedlist linkedlist
${LUA_LIBRARIES}
-lSDL2 -lSDL2
-lSDL2_image -lSDL2_image
-lSDL2_mixer -lSDL2_mixer
-lSDL2_ttf -lSDL2_ttf
-lX11 -lX11
-lXrandr -lXrandr
-llua
) )
# TESTS: # TESTS: