root/trunk/thune/CMakeLists.txt

Revision 550, 1.9 kB (checked in by krobillard, 7 weeks ago)

Thune:

  • 8-bit string encoding is now Latin-1.
  • Now using WELL512a generator for random numbers.
  • Added hash-map datatype. List datatype can now be disabled in config.
  • Added project-point, remap.
  • Unique & fill now handle vector!.
  • File port 'read now retuns none when end of file reached.

Thune-GL:

  • Added draw-prog! & vertex-buffer! datatypes.
  • Display now accepts /fullscreen option.
  • Added particle-sim dialect.
Line 
1project(Thune C)
2
3#set(CMAKE_BUILD_TYPE Debug)
4 set(CMAKE_BUILD_TYPE Release)
5
6
7# Why isn't this the default?
8# Having to repeat the conditional expression is retarded.
9set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
10
11set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/")
12
13
14# Config defines
15add_definitions(
16    -DLANG_THUNE
17    -DUR_CONFIG_BZIP2
18    -DUR_CONFIG_TRIG
19    -DUR_CONFIG_MATH3D
20    -DUR_CONFIG_DATAFLOW
21    -DUR_CONFIG_FCALC
22    -DUR_CONFIG_NET
23    -DUR_CONFIG_MACROS
24)
25
26if(CMAKE_BUILD_TYPE STREQUAL "Debug")
27    add_definitions(-DDEBUG)
28endif ()
29
30
31if (UNIX)
32    include_directories(. unix)
33    add_definitions(-std=c99 -pedantic -D_GNU_SOURCE)
34    set(OS_FILE unix/os.c)
35endif ()
36
37if (WIN32)
38    include_directories(. win32)
39    set(OS_FILE win32/os.c)
40endif ()
41
42
43add_library(thune-lib SHARED
44    urlan.c
45    array.c
46    list.c
47    make.c
48    eval.c
49    thread.c
50    gc.c
51    tokenize.c
52    charset.c
53    context.c
54    print.c
55    series.c
56    parse.c
57    stdio.c
58    files.c
59    math.c
60    bignum.c
61    support/well512.c
62    ${OS_FILE}
63)
64
65set_target_properties(thune-lib PROPERTIES OUTPUT_NAME "thune")
66
67if (APPLE)
68    target_link_libraries(thune-lib m bz2)
69endif ()
70if (UNIX AND NOT APPLE)
71    target_link_libraries(thune-lib m bz2 pthread)
72endif ()
73if (WIN32)
74    target_link_libraries(thune-lib ws2_32)
75endif ()
76
77
78add_executable(thune-bin console.c)
79set_target_properties(thune-bin PROPERTIES OUTPUT_NAME "thune")
80
81# NOTE: This links the binary with the libraries thune-lib links against.
82# This creates unneeded linker dependencies, but the CMake FAQ says that
83# there is no way to change this behavior.
84# Here is a blog entry which talks about this problem:
85#   http://blogs.sun.com/rie/entry/tt_dependencies_tt_define_what
86
87target_link_libraries(thune-bin thune-lib)
88
89
90if (UNIX)
91install(TARGETS thune-bin DESTINATION /usr/local/bin)
92install(TARGETS thune-lib DESTINATION /usr/local/lib)
93install(FILES   urlan.h   DESTINATION /usr/local/include)
94endif ()
95
96# eof
Note: See TracBrowser for help on using the browser.