CMakeLists.txt 2.81 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2 3 4
cmake_minimum_required(VERSION 2.6)

project(Tutos)

Sylvain Thery's avatar
Sylvain Thery committed
5

6
SET (CMAKE_BUILD_TYPE Debug)
Pierre Kraemer's avatar
Pierre Kraemer committed
7 8
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")

Sylvain Thery's avatar
Sylvain Thery committed
9 10 11 12 13 14 15
# FOR Qt4
FIND_PACKAGE(Qt4 REQUIRED)
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})


Pierre Kraemer's avatar
Pierre Kraemer committed
16
# define includes path
17 18

MESSAGE (STATUS ${BOOST_INCLUDE_PATH})
Pierre Kraemer's avatar
Pierre Kraemer committed
19
include_directories(
Sylvain Thery's avatar
Sylvain Thery committed
20
	${CMAKE_CURRENT_BINARY_DIR}
Pierre Kraemer's avatar
Pierre Kraemer committed
21 22 23 24
	/usr/include/libxml2/
	${CGoGN_ROOT_DIR}/ThirdParty/gzstream
	${CGoGN_ROOT_DIR}/ThirdParty/OpenCTM
	${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include
25
	${CGoGN_ROOT_DIR}/ThirdParty/glm
Pierre Kraemer's avatar
Pierre Kraemer committed
26
	${CGoGN_ROOT_DIR}/include
27
	${BOOST_INCLUDE_PATH}
Pierre Kraemer's avatar
Pierre Kraemer committed
28 29 30
)

# define libs path
thery's avatar
thery committed
31 32 33 34 35 36 37
IF(WIN32)
	link_directories(${CGoGN_ROOT_DIR}/lib/$(ConfigurationName))
ELSE(WIN32)
	link_directories(${CGoGN_ROOT_DIR}/lib/Release ${CGoGN_ROOT_DIR}/lib/Debug)
ENDIF(WIN32)


Pierre Kraemer's avatar
Pierre Kraemer committed
38 39
#define exec to compile

Sylvain Thery's avatar
Sylvain Thery committed
40 41
QT4_WRAP_CPP(tuto1_moc tuto1.h)
add_executable( tuto1 tuto1.cpp ${tuto1_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
42
target_link_libraries( tuto1
Sylvain Thery's avatar
Sylvain Thery committed
43
	${CGoGN_LIBS_D}  ${COMMON_LIBS} ${QT_LIBRARIES} )
Pierre Kraemer's avatar
Pierre Kraemer committed
44

Sylvain Thery's avatar
Sylvain Thery committed
45 46 47
QT4_WRAP_UI( tuto2_ui tuto2.ui )
QT4_WRAP_CPP(tuto2_moc tuto2.h)
add_executable( tuto2 tuto2.cpp tuto2.h ${tuto2_ui}  ${tuto2_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
48
target_link_libraries( tuto2
49
	${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} )
Pierre Kraemer's avatar
Pierre Kraemer committed
50

51 52
QT4_WRAP_CPP(tuto3_moc tuto3.h)
add_executable( tuto3 tuto3.cpp ${tuto3_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
53
target_link_libraries( tuto3
54
	${CGoGN_LIBS_D} ${COMMON_LIBS}  ${QT_LIBRARIES})
Pierre Kraemer's avatar
Pierre Kraemer committed
55

56 57 58
QT4_WRAP_UI( tuto4_ui tuto4.ui )
QT4_WRAP_CPP(tuto4_moc tuto4.h)
add_executable( tuto4 tuto4.cpp ${tuto4_ui} ${tuto4_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
59
target_link_libraries( tuto4
60
	${CGoGN_LIBS_D}  ${COMMON_LIBS}  ${QT_LIBRARIES} )
Pierre Kraemer's avatar
Pierre Kraemer committed
61

62 63 64
QT4_WRAP_UI( tuto5_ui tuto5.ui )
QT4_WRAP_CPP(tuto5_moc tuto5.h)
add_executable( tuto5 tuto5.cpp ${tuto5_ui} ${tuto5_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
65
target_link_libraries( tuto5
66
	${CGoGN_LIBS_D}  ${COMMON_LIBS}  ${QT_LIBRARIES} )
Pierre Kraemer's avatar
Pierre Kraemer committed
67

untereiner's avatar
untereiner committed
68

Sylvain Thery's avatar
Sylvain Thery committed
69 70 71
#add_executable( tuto_subdivision tuto_subdivision.cpp)
#target_link_libraries( tuto_subdivision
#	${CGoGN_LIBS_D}  ${COMMON_LIBS} )
Pierre Kraemer's avatar
Pierre Kraemer committed
72

73 74
QT4_WRAP_CPP(tp_master_moc tp_master.h)
add_executable( tp_master tp_master.cpp ${tp_master_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
75
target_link_libraries( tp_master
76
	${CGoGN_LIBS_D}  ${COMMON_LIBS}  ${QT_LIBRARIES} )
Sylvain Thery's avatar
Sylvain Thery committed
77

78 79 80
#BOOST_LIBS macro: allow using compiled boost in windows (see readme)
# -first argument variable that will contain the libs
# -second argument list of boost libs separated by ; in " "
81 82
# exemple: BOOST_LIBS(boost_lib_lists "boost_thread-mt;boost_iostreams-mt")
BOOST_LIBS(boost_lib_lists "boost_thread-mt")
83

84 85
QT4_WRAP_CPP(tuto_mt_moc tuto_mt.h)
add_executable( tuto_mt tuto_mt.cpp  ${tuto_mt_moc})
Sylvain Thery's avatar
Sylvain Thery committed
86
target_link_libraries( tuto_mt
87
	${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} ${boost_lib_lists})
88

Sylvain Thery's avatar
Sylvain Thery committed
89 90
QT4_WRAP_CPP(tuto_ogl3_moc tuto_ogl3.h)
add_executable( tuto_ogl3 tuto_ogl3.cpp ${tuto_ogl3_moc})
91
target_link_libraries( tuto_ogl3
92
	${CGoGN_LIBS_D}  ${COMMON_LIBS} ${QT_LIBRARIES} )
93

untereiner's avatar
untereiner committed
94 95


Sylvain Thery's avatar
Sylvain Thery committed
96 97 98
#add_executable( tuto_ogl2 tuto_ogl2.cpp)
#target_link_libraries( tuto_ogl2
#	${CGoGN_LIBS_D}  ${COMMON_LIBS} )