46 lines
1.0 KiB
CMake
46 lines
1.0 KiB
CMake
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.
|
|
#set(QT_USE_QTOPENGL TRUE)
|
|
# -> 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
|
|
aigoqt.cpp
|
|
main.cpp
|
|
)
|
|
|
|
#ui
|
|
set(aigoqt_UIS
|
|
main.ui
|
|
)
|
|
qt4_wrap_ui(aigoqt_UIS_H ${aigoqt_UIS})
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
#moc
|
|
qt4_automoc(${aigoqt_SRCS})
|
|
|
|
#resources
|
|
#qt4_add_resources(aigoqt_RESOURCES resources)
|
|
|
|
include_directories(
|
|
${QT_INCLUDE_DIR}
|
|
${QT_QTOPENGL_INCLUDE_DIR}
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
../lib/
|
|
)
|
|
add_executable(aigoqt ${aigoqt_SRCS} ${aigoqt_UIS_H})
|
|
target_link_libraries(aigoqt ${QT_LIBRARIES} aigolib)
|
|
|