Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 105 lines (80 sloc) 3.122 kb
02e028f experimenting with CMake support, as autotools are so heinous to work wi...
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 stuff ...
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 stuff ...
rtv authored
9
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
10 SET( MIN_PLAYER_MAJOR 2 )
11 SET( MIN_PLAYER_MINOR 1 )
128f559 updated cmake file
alexcb authored
12
7dc54a6 expanded test prog, reduced unecessary displaylist building, moved const...
rtv authored
13 #SET(CMAKE_BUILD_TYPE debug)
14 #SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-O3")
15 #SET(CMAKE_C_FLAGS_DISTRIBUTION "-O3")
16
17
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
18 cmake_minimum_required( VERSION 2.4 FATAL_ERROR )
19
20 IF (CMAKE_MAJOR_VERSION EQUAL 2 AND NOT CMAKE_MINOR_VERSION LESS 6)
21 cmake_policy( SET CMP0003 NEW )
22 cmake_policy( SET CMP0005 OLD )
23 ENDIF (CMAKE_MAJOR_VERSION EQUAL 2 AND NOT CMAKE_MINOR_VERSION LESS 6)
128f559 updated cmake file
alexcb authored
24
3d4fd9e improved the CMake build scripts to the point where the autotools stuff ...
rtv authored
25 MESSAGE (STATUS "${PROJECT_NAME} version ${VERSION}")
26
27 # define some preprocessor strings that the code is expecting
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
28 ADD_DEFINITIONS( -DPROJECT=\\\"${PROJECT_NAME}\\\"
29 -DINSTALL_PREFIX=\\\"${CMAKE_INSTALL_PREFIX}\\\"
30 -DVERSION=\\\"${VERSION}\\\" )
4f9d098 cmake build works with modules & partially installs
rtv authored
31
2ba0e44 added laser noise generating plugin as a demo
rtv authored
32 include(FindPkgConfig)
33
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
34 pkg_search_module( GLIB REQUIRED glib-2.0 )
35 find_package( OpenGL REQUIRED )
36
37 #pkg_search_module( PLAYER playercore )
38 #SET(VER_PATTERN "([0-9]*)\\.([0-9]*)\\.([0-9]*)")
39 #STRING( REGEX REPLACE ${VER_PATTERN} "\\1" PLAYER_MAJOR_VER ${PLAYER_VERSION} )
40 #MESSAGE( "Major: ${PLAYER_MAJOR_VER}" )
41 #STRING( REGEX REPLACE ${VER_PATTERN} "\\2" PLAYER_MINOR_VER ${PLAYER_VERSION} )
42 #MESSAGE( "Minor: ${PLAYER_MINOR_VER}" )
43 #IF( NOT PLAYER_MAJOR_VER LESS MIN_PLAYER_MAJOR )
44 # IF( NOT PLAYER_MINOR_VER LESS MIN_PLAYER_MINOR )
45 # MESSAGE( STATUS " Player up to date, building plugin")
46 # ADD_SUBDIRECTORY(libstageplugin)
47 # ENDIF( NOT PLAYER_MINOR_VER LESS MIN_PLAYER_MINOR )
48 #ENDIF( NOT PLAYER_MAJOR_VER LESS MIN_PLAYER_MAJOR )
49
50 FIND_PROGRAM (FLTKCONFIG NAMES fltk-config)
51 IF (FLTKCONFIG)
52 EXECUTE_PROCESS (COMMAND fltk-config --cxxflags --use-gl --use-images
53 OUTPUT_VARIABLE FLTK_CFLAGS
54 OUTPUT_STRIP_TRAILING_WHITESPACE)
55 EXECUTE_PROCESS (COMMAND fltk-config --ldflags --use-gl --use-images
56 OUTPUT_VARIABLE FLTK_LIBRARIES
57 OUTPUT_STRIP_TRAILING_WHITESPACE)
58 MESSAGE (STATUS "Found FLTK")
59 SET (FLTK_FOUND TRUE)
60 ELSE (FLTKCONFIG)
61 MESSAGE (FATAL_ERROR "FLTK not found, aborting")
62 SET (FLTK_FOUND FALSE)
63 ENDIF (FLTKCONFIG)
64
65
66 IF (APPLE)
67 MESSAGE(STATUS "Setting Apple specific flags")
7dc54a6 expanded test prog, reduced unecessary displaylist building, moved const...
rtv authored
68 # work around the OS X 10.5 X11/OpenGL library bug
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
69 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")
70 ENDIF (APPLE)
2ba0e44 added laser noise generating plugin as a demo
rtv authored
71
3d4fd9e improved the CMake build scripts to the point where the autotools stuff ...
rtv authored
72 # all targets need these include directories
73 include_directories( .
74 libstage
2ba0e44 added laser noise generating plugin as a demo
rtv authored
75 replace
76 ${GLIB_INCLUDE_DIRS}
77 ${FLTK_INCLUDE_DIR}
9130904 Linux build fixes, thanks Toby
jeremy_asher authored
78 ${CMAKE_INCLUDE_PATH}
3d4fd9e improved the CMake build scripts to the point where the autotools stuff ...
rtv authored
79 )
80
81
82 # all targets need these library directories
83 link_directories(${GLIB_LIBRARY_DIRS}
84 ${FLTK_LIBRARY_DIRS}
85 ${OPENGL_LIBRARY_DIRS}
2ba0e44 added laser noise generating plugin as a demo
rtv authored
86 )
87
3d4fd9e improved the CMake build scripts to the point where the autotools stuff ...
rtv authored
88 # generate a configuration header file in this dir
89 # CONFIGURE_FILE( config.h.cmake config.h )
90
91 # work through these subdirs
02e028f experimenting with CMake support, as autotools are so heinous to work wi...
rtv authored
92 ADD_SUBDIRECTORY(libstage)
2ba0e44 added laser noise generating plugin as a demo
rtv authored
93 ADD_SUBDIRECTORY(examples)
3d4fd9e improved the CMake build scripts to the point where the autotools stuff ...
rtv authored
94
4eae212 tweaking build scripts
rtv authored
95 INSTALL(FILES rgb.txt stagelogo.png
8a8cb3f moved around status icon assets and modified install script
alexcb authored
96 DESTINATION share/stage
97 )
98
99 FILE( GLOB assets "assets/*.png" )
100 INSTALL(FILES ${assets}
101 DESTINATION share/stage/assets
4eae212 tweaking build scripts
rtv authored
102 )
103
104
Something went wrong with that request. Please try again.