-
Notifications
You must be signed in to change notification settings - Fork 13
/
CMakeLists.txt
62 lines (48 loc) · 1.47 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
PROJECT(osgTT)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
IF(NOT WIN32)
SET(CMAKE_C_FLAGS "-W -Wall -Wno-unused -fPIC")
SET(CMAKE_CXX_FLAGS "-W -Wall -Wno-unused -fPIC")
ENDIF()
SET(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Add a postfix, usually d on windows")
SET(OPENSCENEGRAPH_INCLUDE_DIR "" CACHE PATH "Location of the OSG include headers.")
SET(OPENSCENEGRAPH_LIB_DIR "" CACHE PATH "Location of the the OSG library objects.")
SET(SRC_FILES
src/DepthPeeling.cpp
src/EBCNode.cpp
src/EBCReader.cpp
src/TransparencyGroup.cpp
)
SET(HEADER_FILES
src/DepthPeeling.h
src/EBCNode.h
src/EBCReader.h
src/TransparencyGroup.h
)
SOURCE_GROUP("Header Files" FILES ${HEADER_FILES})
SOURCE_GROUP("Source Files" FILES ${SRC_FILES})
INCLUDE_DIRECTORIES(
${OPENSCENEGRAPH_INCLUDE_DIR}
src
)
LINK_DIRECTORIES(${OPENSCENEGRAPH_LIB_DIR})
ADD_LIBRARY(osgtt STATIC ${HEADER_FILES} ${SRC_FILES})
TARGET_LINK_LIBRARIES(osgtt
debug OpenThreads${CMAKE_DEBUG_POSTFIX}
optimized OpenThreads
debug osg${CMAKE_DEBUG_POSTFIX}
optimized osg
debug osgGA${CMAKE_DEBUG_POSTFIX}
optimized osgGA
debug osgDB${CMAKE_DEBUG_POSTFIX}
optimized osgDB
debug osgUtil${CMAKE_DEBUG_POSTFIX}
optimized osgUtil
debug osgViewer${CMAKE_DEBUG_POSTFIX}
optimized osgViewer
)
ADD_EXECUTABLE(osgtt-demo src/osgtt-demo.cpp)
ADD_EXECUTABLE(osgtt-shape src/osgtt-shape.cpp)
TARGET_LINK_LIBRARIES(osgtt-demo osgtt)
TARGET_LINK_LIBRARIES(osgtt-shape osgtt)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/demo)