CMakeLists.txt
author Ryan C. Gordon <icculus@icculus.org>
Thu, 08 May 2008 01:02:07 -0400
branchtrunk
changeset 292 f6c1a2ec6030
parent 269 fbc4e1843809
child 328 6ea15911de70
permissions -rw-r--r--
Added >= ps_2_0 state for TEXLD opcode, cleaned up swizzle checks.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35
5749d174b537 [svn] Might as well keep the tradition alive.
icculus
parents: 10
diff changeset
     1
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
5749d174b537 [svn] Might as well keep the tradition alive.
icculus
parents: 10
diff changeset
     2
PROJECT(MojoShader)
48
86dc2c772d26 [svn] Enabled -Wall, found some bugs.
icculus
parents: 35
diff changeset
     3
86dc2c772d26 [svn] Enabled -Wall, found some bugs.
icculus
parents: 35
diff changeset
     4
IF(CMAKE_COMPILER_IS_GNUCC)
86dc2c772d26 [svn] Enabled -Wall, found some bugs.
icculus
parents: 35
diff changeset
     5
    ADD_DEFINITIONS(-Wall -ggdb3)
86dc2c772d26 [svn] Enabled -Wall, found some bugs.
icculus
parents: 35
diff changeset
     6
ENDIF(CMAKE_COMPILER_IS_GNUCC)
86dc2c772d26 [svn] Enabled -Wall, found some bugs.
icculus
parents: 35
diff changeset
     7
52
305ddf21d660 [svn] Okay, done with memory profiling for now.
icculus
parents: 48
diff changeset
     8
# testparse uses this when I'm looking at memory usage patterns.
305ddf21d660 [svn] Okay, done with memory profiling for now.
icculus
parents: 48
diff changeset
     9
#ADD_DEFINITIONS(-DMOJOSHADER_DEBUG_MALLOC=1)
48
86dc2c772d26 [svn] Enabled -Wall, found some bugs.
icculus
parents: 35
diff changeset
    10
254
13184ff204b9 More Windows patches.
Ryan C. Gordon <icculus@icculus.org>
parents: 225
diff changeset
    11
IF(MSVC)
13184ff204b9 More Windows patches.
Ryan C. Gordon <icculus@icculus.org>
parents: 225
diff changeset
    12
    ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS=1)
13184ff204b9 More Windows patches.
Ryan C. Gordon <icculus@icculus.org>
parents: 225
diff changeset
    13
    ADD_DEFINITIONS(-TP)  # force .c files to compile as C++.
13184ff204b9 More Windows patches.
Ryan C. Gordon <icculus@icculus.org>
parents: 225
diff changeset
    14
ENDIF(MSVC)
13184ff204b9 More Windows patches.
Ryan C. Gordon <icculus@icculus.org>
parents: 225
diff changeset
    15
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
    16
FIND_PACKAGE(SDL)
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
    17
IF(SDL_FOUND)
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
    18
    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
    19
    ADD_DEFINITIONS(-DFINDERRORS_COMPILE_SHADERS=1)
269
fbc4e1843809 Added glcaps.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 254
diff changeset
    20
    ADD_EXECUTABLE(glcaps glcaps.c)
fbc4e1843809 Added glcaps.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 254
diff changeset
    21
    TARGET_LINK_LIBRARIES(glcaps ${SDL_LIBRARY})
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
    22
ENDIF(SDL_FOUND)
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
    23
35
5749d174b537 [svn] Might as well keep the tradition alive.
icculus
parents: 10
diff changeset
    24
ADD_EXECUTABLE(testparse testparse.c mojoshader.c)
225
b43efdf651ed Added mojoshader_opengl.c to the project file.
Ryan C. Gordon <icculus@icculus.org>
parents: 174
diff changeset
    25
ADD_EXECUTABLE(finderrors finderrors.c mojoshader.c mojoshader_opengl.c)
171
4bf769d41b01 Updatged CMakeLists.txt to remove pthread reference.
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    26
TARGET_LINK_LIBRARIES(finderrors ${SDL_LIBRARY} ${EXTRA_LIBS})
1
99ac16070d07 [svn] Initial add.
icculus
parents:
diff changeset
    27
99ac16070d07 [svn] Initial add.
icculus
parents:
diff changeset
    28
# End of CMakeLists.txt ...
99ac16070d07 [svn] Initial add.
icculus
parents:
diff changeset
    29