Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 124 lines (99 sloc) 3.964 kB
02e028f experimenting with CMake support, as autotools are so heinous to work…
rtv authored
1 PROJECT(Stage)
2ba0e44 added laser noise generating plugin as a demo
rtv authored
2
3d4fd9e improved the CMake build scripts to the point where the autotools stu…
rtv authored
3 SET( V_MAJOR 3 )
4 SET( V_MINOR 0 )
5 SET( V_BUGFIX 0 )
6
7 SET( VERSION ${V_MAJOR}.${V_MINOR}.${V_BUGFIX} )
c6c30f3 making sure
rtv authored
8 SET( APIVERSION ${V_MAJOR}.${V_MINOR} )
3d4fd9e improved the CMake build scripts to the point where the autotools stu…
rtv authored
9
90c9778 Fixed player version checking routine in build files
jeremy_asher authored
10 # minimum version of Player to build the plugin
9a02678 Fixed Player version checking
jeremy_asher authored
11 SET( MIN_PLAYER 2.1.0 )
7dc54a6 expanded test prog, reduced unecessary displaylist building, moved co…
rtv authored
12
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
13 cmake_minimum_required( VERSION 2.4 FATAL_ERROR )
14
15 IF (CMAKE_MAJOR_VERSION EQUAL 2 AND NOT CMAKE_MINOR_VERSION LESS 6)
16 cmake_policy( SET CMP0003 NEW )
17 cmake_policy( SET CMP0005 OLD )
18 ENDIF (CMAKE_MAJOR_VERSION EQUAL 2 AND NOT CMAKE_MINOR_VERSION LESS 6)
128f559 updated cmake file
alexcb authored
19
3d4fd9e improved the CMake build scripts to the point where the autotools stu…
rtv authored
20 MESSAGE (STATUS "${PROJECT_NAME} version ${VERSION}")
21
22 # define some preprocessor strings that the code is expecting
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
23 ADD_DEFINITIONS( -DPROJECT=\\\"${PROJECT_NAME}\\\"
24 -DINSTALL_PREFIX=\\\"${CMAKE_INSTALL_PREFIX}\\\"
25 -DVERSION=\\\"${VERSION}\\\" )
4f9d098 cmake build works with modules & partially installs
rtv authored
26
ba19828 added support for building and installing stage.pc
gerkey authored
27 # Create the pkgconfig file
28 CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/stage.pc.in ${CMAKE_CURRENT_BINARY_DIR}/stage.pc @ONLY)
29 INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/stage.pc DESTINATION lib/pkgconfig/)
2ba0e44 added laser noise generating plugin as a demo
rtv authored
30
08f0500 added hooks to build config.h and find rgb.txt
gerkey authored
31 # Create the config.h file
32 SET(RGBFILE \"${CMAKE_INSTALL_PREFIX}/share/stage/rgb.txt\")
33 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY)
34
90c9778 Fixed player version checking routine in build files
jeremy_asher authored
35 # find the easy modules
36 include(FindPkgConfig)
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
37 pkg_search_module( GLIB REQUIRED glib-2.0 )
8d73535 Fixed libpng dep
jeremy_asher authored
38 pkg_search_module( LIBPNG REQUIRED libpng )
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
39 find_package( OpenGL REQUIRED )
40
9a02678 Fixed Player version checking
jeremy_asher authored
41 # Look for player v${MIN_PLAYER} or higher and set flags
42 # built-ins don't work properly, so use pkg-config directly
43 FIND_PROGRAM (PKGCONFIG NAMES pkg-config)
44 IF (PKGCONFIG)
45 EXECUTE_PROCESS (COMMAND pkg-config --atleast-version=${MIN_PLAYER} playercore --silence-errors
46 RESULT_VARIABLE PLAYER_NOT_FOUND)
47 IF (PLAYER_NOT_FOUND EQUAL 0)
48 # found the correct version
49 pkg_search_module( PLAYER playercore )
50 MESSAGE(STATUS " Player headers found in ${PLAYER_INCLUDE_DIRS}")
51 MESSAGE(STATUS " Player libs found in ${PLAYER_LIBRARY_DIRS}")
52 SET (PLAYER_FOUND TRUE)
53 ELSE (PLAYER_NOT_FOUND EQUAL 0)
54 MESSAGE(STATUS "Player >=v${MIN_PLAYER} not found, skipping Player plugin")
55 SET (PLAYER_FOUND FALSE)
56 ENDIF (PLAYER_NOT_FOUND EQUAL 0)
57 ELSE (PKGCONFIG)
58 MESSAGE (STATUS "pkg-config not found, skipping Player plugin")
59 ENDIF (PKGCONFIG)
772b106 cleaning up API some more - moved real time stuff out of world and in…
rtv authored
60
90c9778 Fixed player version checking routine in build files
jeremy_asher authored
61
62 # find FLTK and set flags
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
63 FIND_PROGRAM (FLTKCONFIG NAMES fltk-config)
64 IF (FLTKCONFIG)
65 EXECUTE_PROCESS (COMMAND fltk-config --cxxflags --use-gl --use-images
66 OUTPUT_VARIABLE FLTK_CFLAGS
67 OUTPUT_STRIP_TRAILING_WHITESPACE)
68 EXECUTE_PROCESS (COMMAND fltk-config --ldflags --use-gl --use-images
69 OUTPUT_VARIABLE FLTK_LIBRARIES
70 OUTPUT_STRIP_TRAILING_WHITESPACE)
71 MESSAGE (STATUS "Found FLTK")
72 SET (FLTK_FOUND TRUE)
73 ELSE (FLTKCONFIG)
74 MESSAGE (FATAL_ERROR "FLTK not found, aborting")
75 SET (FLTK_FOUND FALSE)
76 ENDIF (FLTKCONFIG)
77
78 IF (APPLE)
90c9778 Fixed player version checking routine in build files
jeremy_asher authored
79 # define flags to avoid the error:
80 # ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
81 MESSAGE(STATUS "Setting Apple specific flags")
7dc54a6 expanded test prog, reduced unecessary displaylist building, moved co…
rtv authored
82 # work around the OS X 10.5 X11/OpenGL library bug
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
83 SET(APPLE_LIBRARIES "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
84 ENDIF (APPLE)
2ba0e44 added laser noise generating plugin as a demo
rtv authored
85
3d4fd9e improved the CMake build scripts to the point where the autotools stu…
rtv authored
86 # all targets need these include directories
87 include_directories( .
88 libstage
2ba0e44 added laser noise generating plugin as a demo
rtv authored
89 replace
0b5282f fixed stall icon positioning for perspective camera mode
alexcb authored
90 /opt/local/include/
2ba0e44 added laser noise generating plugin as a demo
rtv authored
91 ${GLIB_INCLUDE_DIRS}
8d73535 Fixed libpng dep
jeremy_asher authored
92 ${LIBPNG_INCLUDE_DIRS}
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
93 ${CMAKE_INCLUDE_PATH}
3d4fd9e improved the CMake build scripts to the point where the autotools stu…
rtv authored
94 )
95
96
97 # all targets need these library directories
98 link_directories(${GLIB_LIBRARY_DIRS}
8d73535 Fixed libpng dep
jeremy_asher authored
99 ${LIBPNG_LIBRARY_DIRS}
3d4fd9e improved the CMake build scripts to the point where the autotools stu…
rtv authored
100 ${OPENGL_LIBRARY_DIRS}
2ba0e44 added laser noise generating plugin as a demo
rtv authored
101 )
102
3d4fd9e improved the CMake build scripts to the point where the autotools stu…
rtv authored
103 # generate a configuration header file in this dir
104 # CONFIGURE_FILE( config.h.cmake config.h )
105
106 # work through these subdirs
02e028f experimenting with CMake support, as autotools are so heinous to work…
rtv authored
107 ADD_SUBDIRECTORY(libstage)
2ba0e44 added laser noise generating plugin as a demo
rtv authored
108 ADD_SUBDIRECTORY(examples)
9a02678 Fixed Player version checking
jeremy_asher authored
109 IF ( PLAYER_FOUND )
110 ADD_SUBDIRECTORY(libstageplugin)
111 ENDIF ( PLAYER_FOUND )
772b106 cleaning up API some more - moved real time stuff out of world and in…
rtv authored
112
113
4eae212 tweaking build scripts
rtv authored
114 INSTALL(FILES rgb.txt stagelogo.png
8a8cb3f moved around status icon assets and modified install script
alexcb authored
115 DESTINATION share/stage
116 )
117
118 FILE( GLOB assets "assets/*.png" )
119 INSTALL(FILES ${assets}
120 DESTINATION share/stage/assets
4eae212 tweaking build scripts
rtv authored
121 )
122
123
Something went wrong with that request. Please try again.