src/CMakeLists.txt
changeset 33 56571d34d754
parent 31 bbcb8a3366b4
child 52 c9401e6a62cb
equal deleted inserted replaced
32:89fb9c6611ca 33:56571d34d754
     6 SET(CMAKE_VERBOSE_MAKEFILE Off)
     6 SET(CMAKE_VERBOSE_MAKEFILE Off)
     7 SET(CMAKE_BUILD_TYPE Release)
     7 SET(CMAKE_BUILD_TYPE Release)
     8 SET(CMAKE_C_FLAGS_RELEASE "-g -ggdb")
     8 SET(CMAKE_C_FLAGS_RELEASE "-g -ggdb")
     9 
     9 
    10 # C-Definitions
    10 # C-Definitions
    11 ADD_DEFINITIONS(-Wall -O2 -ansi -pedantic)
    11 ADD_DEFINITIONS(-Wall -O2 -ansi)
    12 ADD_DEFINITIONS(-D_XOPEN_SOURCE=500)
    12 ADD_DEFINITIONS(-D_XOPEN_SOURCE=500)
    13 ADD_DEFINITIONS(-DBOT_VERSION=0.97)
    13 ADD_DEFINITIONS(-DBOT_VERSION=0.99)
    14 
    14 
    15 # Includes
    15 # Includes
    16 INCLUDE_DIRECTORIES(../include)
    16 INCLUDE_DIRECTORIES(../include)
    17 
    17 
    18 # Target Definitions
    18 # Target Definitions
    21 
    21 
    22 # Install Rules
    22 # Install Rules
    23 INSTALL(TARGETS mcbot RUNTIME DESTINATION /usr/sbin)
    23 INSTALL(TARGETS mcbot RUNTIME DESTINATION /usr/sbin)
    24 INSTALL(TARGETS dbtool RUNTIME DESTINATION /usr/bin)
    24 INSTALL(TARGETS dbtool RUNTIME DESTINATION /usr/bin)
    25 INSTALL(DIRECTORY ../locale/ DESTINATION /var/lib/mcbot/data/locale)
    25 INSTALL(DIRECTORY ../locale/ DESTINATION /var/lib/mcbot/data/locale)
    26 INSTALL(PROGRAMS ../scripts/runbot DESTINATION /etc/init.d/ 
    26 INSTALL(PROGRAMS ../scripts/runbot DESTINATION /etc/init.d/
    27 	RENAME mcbot)
    27 	RENAME mcbot)
    28 INSTALL(PROGRAMS ../scripts/mcbot.cgi DESTINATION /usr/lib/cgi-bin/)
    28 INSTALL(PROGRAMS ../scripts/mcbot.cgi DESTINATION /usr/lib/cgi-bin/)
    29 
    29 
    30 # Search required programs
    30 # Search required programs
    31 FIND_PROGRAM(MSGFMT_PROG msgfmt)
    31 FIND_PROGRAM(MSGFMT_PROG msgfmt)
    32 IF (MSGFMT_PROG)
    32 IF (MSGFMT_PROG)
    33     EXEC_PROGRAM(${MSGFMT_PROG} ../locale ARGS -o de/LC_MESSAGES/mcbot.mo de/mcbot.po)
    33     EXEC_PROGRAM(${MSGFMT_PROG} ../locale ARGS -o de/LC_MESSAGES/mcbot.mo de/mcbot.po)
    34 ELSE(MSGFMT_PROG)
    34 ELSE(MSGFMT_PROG)
    35 	MESSAGE(FATAL_ERROR "YOU NEED TO INSTALL gettext")
    35 	MESSAGE(FATAL_ERROR "YOU NEED TO INSTALL gettext")
    36 ENDIF (MSGFMT_PROG)    
    36 ENDIF (MSGFMT_PROG)
    37 
    37 
    38 # Search required libraries
    38 # Search required libraries
    39 FIND_LIBRARY(GDBM_LIB NAMES gdbm
    39 FIND_LIBRARY(GDBM_LIB NAMES gdbm
    40 	PATHS /usr/lib/ /usr/local/lib)
    40 	PATHS /usr/lib/ /usr/local/lib)
    41 IF (GDBM_LIB)
    41 IF (GDBM_LIB)