Added libtest and fixed library. QT application not yet used.
This commit is contained in:
parent
9779856e07
commit
eef0ecc952
|
@ -4,3 +4,10 @@ set(lib_DIR lib)
|
|||
get_filename_component(lib_ABSOLUTE ${lib_DIR} ABSOLUTE)
|
||||
add_subdirectory(${lib_ABSOLUTE})
|
||||
|
||||
set(libtest_DIR libtest)
|
||||
get_filename_component(libtest_ABSOLUTE ${libtest_DIR} ABSOLUTE)
|
||||
add_subdirectory(${libtest_ABSOLUTE})
|
||||
|
||||
#set(qt_DIR qt)
|
||||
#get_filename_component(qt_ABSOLUTE ${qt_DIR} ABSOLUTE)
|
||||
#add_subdirectory(${qt_ABSOLUTE})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
project(aigo)
|
||||
project(aigolib)
|
||||
|
||||
set(AIGO_SRCS
|
||||
camera.cpp
|
||||
|
@ -21,9 +21,9 @@ include_directories( ${OPENGL_INCLUDE_DIR} )
|
|||
#find_package(GLEW REQUIRED)
|
||||
|
||||
#compile the aigo library
|
||||
add_library(aigo ${AIGO_SRCS})
|
||||
add_library(aigolib ${AIGO_SRCS})
|
||||
#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
||||
# c99 flag not used now, not supported by visual studio
|
||||
|
||||
target_link_libraries(aigo ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${OPENGL_LIBRARIES} )
|
||||
target_link_libraries(aigolib ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${OPENGL_LIBRARIES} )
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
project(libtest)
|
||||
|
||||
link_directories(../lib)
|
||||
include_directories(../lib)
|
||||
add_executable(libtest main.cpp)
|
||||
target_link_libraries(libtest aigolib)
|
|
@ -0,0 +1,9 @@
|
|||
#include <state.h>
|
||||
#include <settings.h>
|
||||
#include <quickcam.h>
|
||||
|
||||
int main( void )
|
||||
{
|
||||
Quickcam cam("/dev/video0");
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
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
|
||||
|
||||
)
|
||||
|
||||
#ui
|
||||
set(aigoqt_UIS
|
||||
|
||||
)
|
||||
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)
|
||||
|
||||
link_directories(${effector_ABSOLUTE})
|
||||
include_directories(
|
||||
${QT_INCLUDE_DIR}
|
||||
${QT_QTOPENGL_INCLUDE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
#${dgl_ABSOLUTE}
|
||||
${current_demo_dir}
|
||||
)
|
||||
add_executable(aigoqt ${aigoqt_SRCS} ${aigoqt_UIS_H} ${aigoqt_RESOURCES})
|
||||
target_link_libraries(aigoqt ${QT_LIBRARIES} aigolib)
|
||||
|
Reference in New Issue