Added cmake configuration
We leave the original Makefile as alternative, but it is currently overwritten by a call to cmake.
This commit is contained in:
parent
530c81b04b
commit
4bd8be7b58
3 changed files with 33 additions and 1 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,2 +1,7 @@
|
||||||
*.o
|
*.o
|
||||||
*.user
|
*.user
|
||||||
|
/CMakeCache.txt
|
||||||
|
/CMakeFiles/
|
||||||
|
/blockofighter
|
||||||
|
/gmon.out
|
||||||
|
/*.cmake
|
||||||
|
|
27
CMakeLists.txt
Normal file
27
CMakeLists.txt
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
project(blockofighter)
|
||||||
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
aux_source_directory(src SRC_LIST)
|
||||||
|
add_executable(${PROJECT_NAME} ${SRC_LIST})
|
||||||
|
|
||||||
|
find_package(SDL REQUIRED)
|
||||||
|
find_package(SDL_image REQUIRED)
|
||||||
|
|
||||||
|
if(NOT SDL_FOUND)
|
||||||
|
message(FATAL_ERROR "SDL not found!")
|
||||||
|
endif(NOT SDL_FOUND)
|
||||||
|
|
||||||
|
if(NOT SDLIMAGE_FOUND)
|
||||||
|
message(FATAL_ERROR "SDL not found!")
|
||||||
|
endif(NOT SDLIMAGE_FOUND)
|
||||||
|
|
||||||
|
include_directories(
|
||||||
|
${SDL_INCLUDE_DIR}
|
||||||
|
${SDLIMAGE_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
target_link_libraries(blockofighter
|
||||||
|
${SDL_LIBRARY}
|
||||||
|
${SDLIMAGE_LIBRARY}
|
||||||
|
SDLmain
|
||||||
|
GL
|
||||||
|
GLU
|
||||||
|
)
|
2
Makefile
2
Makefile
|
@ -9,7 +9,7 @@ ifeq ($(FMOD), yes)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = c++
|
CC = c++
|
||||||
CFLAGS = -I. -O3 $(GFXFLAGS) $(SNDFLAGS) -pg -s
|
CFLAGS = -I. -O3 $(GFXFLAGS) $(SNDFLAGS)
|
||||||
LIBS = $(GFXLIBS) $(SNDLIBS)
|
LIBS = $(GFXLIBS) $(SNDLIBS)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue