1 #***************************************************************************
2 # CMakeLists.txt - makefile
4 # begin : Sat Oct 06 2007
5 # copyright : (C) 2007 by Maurizio Monge
6 # email : monge@linuz.sns.it
7 #***************************************************************************
9 #***************************************************************************
11 #* This program is free software; you can redistribute it and/or modify *
12 #* it under the terms of the GNU General Public License as published by *
13 #* the Free Software Foundation; either version 2 of the License, or *
14 #* (at your option) any later version. *
16 #***************************************************************************
19 MACRO(ADDCFLAG SRCFILE FLAG)
20 GET_SOURCE_FILE_PROPERTY(loc_flags "${SRCFILE}" COMPILE_FLAGS)
22 SET_SOURCE_FILES_PROPERTIES("${SRCFILE}" PROPERTIES COMPILE_FLAGS "${loc_flags} ${FLAG}")
24 SET_SOURCE_FILES_PROPERTIES("${SRCFILE}" PROPERTIES COMPILE_FLAGS "${FLAG}")
27 ENDMACRO(ADDCFLAG SRCFILE FLAG)
31 #SET(CMAKE_BUILD_TYPE Debug)
32 SET(CMAKE_BUILD_TYPE Release)
33 #SET(CMAKE_BUILD_TYPE Profile)
35 SET(CMAKE_C_FLAGS_RELEASE "-O3 -fomit-frame-pointer -fexpensive-optimizations -fno-strict-aliasing -Wall")
36 SET(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
37 SET(CMAKE_C_FLAGS_PROFILE "-O3 -fexpensive-optimizations -fno-strict-aliasing -pg -Wall")
38 SET(CMAKE_CXX_FLAGS_PROFILE ${CMAKE_C_FLAGS_PROFILE})
39 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g3 -DDEBUG -Wall")
40 SET(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
76 SET(rattatechess_SRC ${rattatechess_SRC} search_gui.cpp)
77 QT4_AUTOMOC(search_gui.cpp)
78 ADD_DEFINITIONS(${QT_DEFINITIONS})
79 INCLUDE_DIRECTORIES(${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR})
81 ADD_DEFINITIONS(-DNO_GUI)
85 ADD_EXECUTABLE(rattatechess ${rattatechess_SRC})
89 TARGET_LINK_LIBRARIES(rattatechess ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})