Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/util/tolua/CMakeLists.txt @ 1075

Last change on this file since 1075 was 1075, checked in by rgrieder, 16 years ago
  • added CMLs in tolua to compile tolua++ executable
File size: 1.7 KB
Line 
1PROJECT(ToLua)
2
3#This sets where to look for modules (e.g. "Find*.cmake" files)
4SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
5
6#Check whether we are on a tardis box
7INCLUDE(CheckTardis)
8
9########## Compiler/Linker options ##############
10
11# if on tardis change compiler and reset boost include directory
12IF(IS_TARDIS)
13  MESSAGE("System is a TARDIS: Setting Compiler to g++-4.1.1")
14  # force-set the compiler on tardis machines, as default points to g++-3.3
15  SET(CMAKE_CXX_COMPILER "g++-4.1.1")
16ENDIF(IS_TARDIS)
17
18#set binary output directories
19SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
20SET(LIBRARY_OUTPUT_PATH    ${PROJECT_BINARY_DIR}/bin/lib)
21
22# global compiler/linker flags. force -O2!
23SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O2 -Wall -g -ggdb")
24SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O2 -Wall -g -ggdb")
25SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
26SET(CMAKE_EXE_LINKER_FLAGS " --no-undefined")
27SET(CMAKE_SHARED_LINKER_FLAGS " --no-undefined")
28SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
29
30#Create verbose makefile output when compiling
31SET(CMAKE_VERBOSE_MAKEFILE TRUE)
32
33
34############### Library finding #################
35
36#Performs the search and sets the variables
37FIND_PACKAGE(Lua)
38
39#Set the search paths for the linking
40LINK_DIRECTORIES(
41  ${Lua_LIBRARIES}
42  m
43)
44
45#Set the search paths for include files
46INCLUDE_DIRECTORIES(
47  ${Lua_INCLUDE_DIR}
48)
49
50
51################ Source files ###################
52
53SET (TOLUA_SRC_FILES
54  tolua.c
55  tolua_event.c
56  tolua_is.c
57  tolua_map.c
58  tolua_push.c
59  tolua_to.c
60  toluabind.c
61)
62
63ADD_EXECUTABLE( tolua ${TOLUA_SRC_FILES} )
64
65TARGET_LINK_LIBRARIES( tolua
66  ${Lua_LIBRARIES}
67)
Note: See TracBrowser for help on using the repository browser.