author | Ryan C. Gordon <icculus@icculus.org> |
Thu, 03 Jul 2008 12:09:26 -0400 | |
branch | trunk |
changeset 421 | bfd3d95273ec |
parent 415 | 25ca83d8bbd5 |
child 423 | ee393c1cf3b4 |
permissions | -rw-r--r-- |
35 | 1 |
CMAKE_MINIMUM_REQUIRED(VERSION 2.4) |
2 |
PROJECT(MojoShader) |
|
48 | 3 |
|
4 |
IF(CMAKE_COMPILER_IS_GNUCC) |
|
5 |
ADD_DEFINITIONS(-Wall -ggdb3) |
|
6 |
ENDIF(CMAKE_COMPILER_IS_GNUCC) |
|
7 |
||
52 | 8 |
# testparse uses this when I'm looking at memory usage patterns. |
9 |
#ADD_DEFINITIONS(-DMOJOSHADER_DEBUG_MALLOC=1) |
|
48 | 10 |
|
254 | 11 |
IF(MSVC) |
12 |
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS=1) |
|
13 |
ADD_DEFINITIONS(-TP) # force .c files to compile as C++. |
|
14 |
ENDIF(MSVC) |
|
15 |
||
415
25ca83d8bbd5
Build mojoshader.c and mojoshader_opengl.c into a static library.
Ryan C. Gordon <icculus@icculus.org>
parents:
406
diff
changeset
|
16 |
ADD_LIBRARY(mojoshader STATIC mojoshader.c mojoshader_opengl.c) |
25ca83d8bbd5
Build mojoshader.c and mojoshader_opengl.c into a static library.
Ryan C. Gordon <icculus@icculus.org>
parents:
406
diff
changeset
|
17 |
|
333
2b36a1d72fa1
Wrote most of the arb1 OpenGL glue code.
Ryan C. Gordon <icculus@icculus.org>
parents:
328
diff
changeset
|
18 |
FIND_PACKAGE(SDL) |
169
7e9d90724cf8
Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents:
153
diff
changeset
|
19 |
IF(SDL_FOUND) |
7e9d90724cf8
Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents:
153
diff
changeset
|
20 |
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR}) |
7e9d90724cf8
Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents:
153
diff
changeset
|
21 |
ADD_DEFINITIONS(-DFINDERRORS_COMPILE_SHADERS=1) |
269 | 22 |
ADD_EXECUTABLE(glcaps glcaps.c) |
23 |
TARGET_LINK_LIBRARIES(glcaps ${SDL_LIBRARY}) |
|
415
25ca83d8bbd5
Build mojoshader.c and mojoshader_opengl.c into a static library.
Ryan C. Gordon <icculus@icculus.org>
parents:
406
diff
changeset
|
24 |
ADD_EXECUTABLE(bestprofile bestprofile.c) |
25ca83d8bbd5
Build mojoshader.c and mojoshader_opengl.c into a static library.
Ryan C. Gordon <icculus@icculus.org>
parents:
406
diff
changeset
|
25 |
TARGET_LINK_LIBRARIES(bestprofile mojoshader ${SDL_LIBRARY}) |
169
7e9d90724cf8
Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents:
153
diff
changeset
|
26 |
ENDIF(SDL_FOUND) |
7e9d90724cf8
Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents:
153
diff
changeset
|
27 |
|
415
25ca83d8bbd5
Build mojoshader.c and mojoshader_opengl.c into a static library.
Ryan C. Gordon <icculus@icculus.org>
parents:
406
diff
changeset
|
28 |
ADD_EXECUTABLE(testparse testparse.c) |
25ca83d8bbd5
Build mojoshader.c and mojoshader_opengl.c into a static library.
Ryan C. Gordon <icculus@icculus.org>
parents:
406
diff
changeset
|
29 |
TARGET_LINK_LIBRARIES(testparse mojoshader) |
25ca83d8bbd5
Build mojoshader.c and mojoshader_opengl.c into a static library.
Ryan C. Gordon <icculus@icculus.org>
parents:
406
diff
changeset
|
30 |
ADD_EXECUTABLE(testoutput testoutput.c) |
25ca83d8bbd5
Build mojoshader.c and mojoshader_opengl.c into a static library.
Ryan C. Gordon <icculus@icculus.org>
parents:
406
diff
changeset
|
31 |
TARGET_LINK_LIBRARIES(testoutput mojoshader) |
25ca83d8bbd5
Build mojoshader.c and mojoshader_opengl.c into a static library.
Ryan C. Gordon <icculus@icculus.org>
parents:
406
diff
changeset
|
32 |
ADD_EXECUTABLE(finderrors finderrors.c) |
25ca83d8bbd5
Build mojoshader.c and mojoshader_opengl.c into a static library.
Ryan C. Gordon <icculus@icculus.org>
parents:
406
diff
changeset
|
33 |
TARGET_LINK_LIBRARIES(finderrors mojoshader ${SDL_LIBRARY}) |
1 | 34 |
|
35 |
# End of CMakeLists.txt ... |
|
36 |