]> Dogcows Code - chaz/yoink/blob - src/Moof/yajl/CMakeLists.txt
added missing licenses
[chaz/yoink] / src / Moof / yajl / CMakeLists.txt
1 # Copyright 2007-2009, Lloyd Hilaiel.
2 #
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are
5 # met:
6 #
7 # 1. Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer.
9 #
10 # 2. Redistributions in binary form must reproduce the above copyright
11 # notice, this list of conditions and the following disclaimer in
12 # the documentation and/or other materials provided with the
13 # distribution.
14 #
15 # 3. Neither the name of Lloyd Hilaiel nor the names of its
16 # contributors may be used to endorse or promote products derived
17 # from this software without specific prior written permission.
18 #
19 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 # DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
23 # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27 # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
28 # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 # POSSIBILITY OF SUCH DAMAGE.
30
31 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
32
33 PROJECT(YetAnotherJSONParser)
34
35 SET (YAJL_MAJOR 1)
36 SET (YAJL_MINOR 0)
37 SET (YAJL_MICRO 5)
38
39 SET (YAJL_DIST_NAME "yajl-${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO}")
40
41 IF (NOT CMAKE_BUILD_TYPE)
42 SET(CMAKE_BUILD_TYPE "Release")
43 ENDIF (NOT CMAKE_BUILD_TYPE)
44
45 SET(CMAKE_C_FLAGS "-Wall")
46 IF (WIN32)
47 SET(linkFlags "/PDB:NONE /INCREMENTAL:NO /OPT:NOREF /OPT:NOICF")
48 SET(CMAKE_EXE_LINKER_FLAGS "${linkFlags}"
49 CACHE STRING "YAJL linker flags" FORCE)
50 SET(CMAKE_EXE_LINKER_FLAGS_DEBUG ""
51 CACHE STRING "YAJL debug linker flags" FORCE)
52 SET(CMAKE_EXE_LINKER_FLAGS_RELEASE
53 CACHE STRING "YAJL release linker flags" FORCE)
54 SET(CMAKE_SHARED_LINKER_FLAGS "${linkFlags}"
55 CACHE STRING "YAJL shared linker flags" FORCE)
56 SET(CMAKE_MODULE_LINKER_FLAGS "${linkFlags}"
57 CACHE STRING "YAJL module linker flags" FORCE)
58
59 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4255 /wd4130 /wd4100 /wd4711")
60 SET(CMAKE_C_FLAGS_DEBUG "/D DEBUG /Od /Z7")
61 SET(CMAKE_C_FLAGS_RELEASE "/D NDEBUG /O2")
62 ELSE (WIN32)
63 SET(CMAKE_C_FLAGS
64 "${CMAKE_C_FLAGS} -fPIC -ansi -pedantic -Wpointer-arith -Wno-format-y2k -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -Wextra -Wundef -Wwrite-strings -Wold-style-definition -Wno-missing-field-initializers -Wredundant-decls -Wno-unused-parameter -Wno-sign-compare -Wmissing-prototypes")
65
66 SET(CMAKE_C_FLAGS_DEBUG "-DDEBUG -g")
67 SET(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2 -Wuninitialized")
68 ENDIF (WIN32)
69
70
71 ADD_SUBDIRECTORY(src)
72 ADD_SUBDIRECTORY(test)
73 ADD_SUBDIRECTORY(reformatter)
74 ADD_SUBDIRECTORY(verify)
75
76 INCLUDE(YAJLDoc.cmake)
77
78 # a test target
79 ADD_CUSTOM_TARGET(test
80 ./run_tests.sh
81 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
82
This page took 0.034972 seconds and 4 git commands to generate.