summaryrefslogtreecommitdiff
blob: 17e194704d7e615a64b6230daea1affea7ce3bb2 (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
--- CMakeLists.txt	2008/02/15 09:55:15	33
+++ CMakeLists.txt	2008/05/19 08:11:36	36
@@ -13,6 +13,8 @@
 # ./AstroMenace
 #
 
+CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
+
 # project name
 PROJECT(AstroMenace)
 
@@ -43,9 +45,12 @@
  IF(DEFINED DATADIR)
 	ADD_DEFINITIONS(-DDATADIR=\\"${DATADIR}\\")
  ENDIF(DEFINED DATADIR)
- ADD_DEFINITIONS(`${SDL_CONFIG} --cflags` -Wall)
+ 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(AstroMenace ${astromenace_SRCS})
- TARGET_LINK_LIBRARIES(AstroMenace `${SDL_CONFIG} --libs` ${OPENGL_gl_LIBRARY} ${OPENAL_LIBRARY} ${JPEG_LIBRARY} ${GLU_LIBRARY} -lalut -lvorbis -lvorbisfile)
+ TARGET_LINK_LIBRARIES(AstroMenace ${SDL_LIBS} ${OPENGL_gl_LIBRARY} ${OPENAL_LIBRARY} ${JPEG_LIBRARY} ${GLU_LIBRARY} -lalut -lvorbis -lvorbisfile)
  IF(CYGWIN)
 	TARGET_LINK_LIBRARIES(AstroMenace -lGL.dll  -lGLU.dll -lglfw -lX11.dll)
 #	ADD_DEFINITIONS(-mno-cygwin)