2007-02-23 18:55:47 +01:00
|
|
|
project(aigoqt)
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 2.4.0)
|
|
|
|
find_package(Qt4 REQUIRED)
|
|
|
|
|
|
|
|
#find SDL and its related libraries
|
|
|
|
find_package(SDL REQUIRED)
|
|
|
|
find_package(SDL_image REQUIRED)
|
|
|
|
include_directories( ${SDL_INCLUDE_DIR} ${SDLIMAGE_INCLUDE_DIR} )
|
|
|
|
|
|
|
|
|
|
|
|
# the next line sets up include and link directories and defines some variables that we will use.
|
|
|
|
# you can modify the behavior by setting some variables, e.g.
|
2007-02-23 21:37:11 +01:00
|
|
|
#set(QT_USE_QTOPENGL TRUE)
|
2007-02-23 18:55:47 +01:00
|
|
|
# -> this will cause cmake to include and link against the OpenGL module
|
|
|
|
include(${QT_USE_FILE})
|
|
|
|
|
|
|
|
# the variable "qtproject_SRCS" contains all .cpp files of this project
|
|
|
|
set(aigoqt_SRCS
|
2007-02-23 21:37:11 +01:00
|
|
|
aigoqt.cpp
|
|
|
|
main.cpp
|
2007-02-23 18:55:47 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
#ui
|
|
|
|
set(aigoqt_UIS
|
2007-02-23 21:37:11 +01:00
|
|
|
main.ui
|
2007-02-23 18:55:47 +01:00
|
|
|
)
|
|
|
|
qt4_wrap_ui(aigoqt_UIS_H ${aigoqt_UIS})
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
|
|
|
#moc
|
|
|
|
qt4_automoc(${aigoqt_SRCS})
|
|
|
|
|
|
|
|
#resources
|
2007-02-23 21:37:11 +01:00
|
|
|
#qt4_add_resources(aigoqt_RESOURCES resources)
|
2007-02-23 18:55:47 +01:00
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${QT_INCLUDE_DIR}
|
|
|
|
${QT_QTOPENGL_INCLUDE_DIR}
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2007-02-23 21:37:11 +01:00
|
|
|
../lib/
|
2007-02-23 18:55:47 +01:00
|
|
|
)
|
2007-02-23 21:37:11 +01:00
|
|
|
add_executable(aigoqt ${aigoqt_SRCS} ${aigoqt_UIS_H})
|
2007-02-23 18:55:47 +01:00
|
|
|
target_link_libraries(aigoqt ${QT_LIBRARIES} aigolib)
|
|
|
|
|