blob: 47936bfe35cc5c29d862d2e86f690bb921fd7547 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
--- CMakeLists.txt.orig 2007-07-12 20:18:26 UTC
+++ CMakeLists.txt
@@ -12,6 +12,8 @@
# into current directory and run ./Memonix
#
+CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
+
# project name
PROJECT(Memonix)
@@ -29,11 +31,15 @@ FIND_PACKAGE(GLU REQUIRED)
FIND_PACKAGE(SDL REQUIRED)
FIND_PACKAGE(SDL_image REQUIRED)
FIND_PACKAGE(SDL_mixer REQUIRED)
+FIND_PACKAGE(X11 REQUIRED)
# sources
-FILE(GLOB_RECURSE memonix_SRCS *.cpp)
+FILE(GLOB_RECURSE memonix_SRCS src/*.cpp)
# targets
-ADD_DEFINITIONS(`${SDL_CONFIG} --cflags`)
+EXEC_PROGRAM(${SDL_CONFIG} ARGS "--cflags" OUTPUT_VARIABLE SDL_CFLAGS)
+EXEC_PROGRAM(${SDL_CONFIG} ARGS "--libs" OUTPUT_VARIABLE SDL_LIBS)
+
+ADD_DEFINITIONS(${SDL_CFLAGS})
ADD_EXECUTABLE(Memonix ${memonix_SRCS})
-TARGET_LINK_LIBRARIES(Memonix `${SDL_CONFIG} --libs` ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${OPENGL_gl_LIBRARY} ${GLU_LIBRARY})
+TARGET_LINK_LIBRARIES(Memonix ${SDL_LIBS} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${OPENGL_gl_LIBRARY} ${GLU_LIBRARY} ${X11_LIBRARIES})
|