root/OpenSceneGraph/trunk/CMakeLists.txt @ 10165

Revision 10165, 35.1 kB (checked in by robert, 5 years ago)

Cleaned up set up of SDL.

  • Property svn:eol-style set to native
Line 
1set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
2
3IF(WIN32)
4    CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)
5ELSE(WIN32)
6    IF(APPLE)
7        CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
8    ELSE(APPLE)
9        CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4 FATAL_ERROR)
10    ENDIF(APPLE)
11ENDIF(WIN32)
12
13if(COMMAND cmake_policy)
14    # Works around warnings libraries linked against that don't
15    # have absolute paths (e.g. -lpthreads)
16    cmake_policy(SET CMP0003 NEW)
17
18    # Works around warnings about escaped quotes in ADD_DEFINITIONS
19    # statements.
20    cmake_policy(SET CMP0005 NEW)
21
22    # cmake-2.6.1 introduces policy cmp0008 decide how to treat full path libraries that do not appear to be valid library file names
23    # quote from cvslog "Such libraries worked by accident in the VS IDE and Xcode generators in CMake 2.4 and below."
24    if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4 AND ${CMAKE_PATCH_VERSION} GREATER 0)
25        cmake_policy(SET CMP0008 OLD)
26    endif()
27endif()
28
29PROJECT(OpenSceneGraph)
30
31SET(OPENSCENEGRAPH_MAJOR_VERSION 2)
32SET(OPENSCENEGRAPH_MINOR_VERSION 9)
33SET(OPENSCENEGRAPH_PATCH_VERSION 4)
34SET(OPENSCENEGRAPH_SOVERSION 59)
35
36# set to 0 when not a release candidate, non zero means that any generated
37# svn tags will be treated as release candidates of given number
38SET(OPENSCENEGRAPH_RELEASE_CANDIDATE 0)
39
40SET(OPENSCENEGRAPH_VERSION ${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION})
41
42SET(OSG_PLUGINS osgPlugins-${OPENSCENEGRAPH_VERSION})
43
44SET(OSG_PLUGIN_PREFIX "")
45
46IF (CYGWIN)
47    SET(OSG_PLUGIN_PREFIX "cygwin_")
48ENDIF()
49
50IF(MINGW)
51    SET(OSG_PLUGIN_PREFIX "mingw_")
52ENDIF()
53
54
55# We want to build SONAMES shared librariess
56SET(OPENSCENEGRAPH_SONAMES TRUE)
57SET(OPENTHREADS_SONAMES TRUE)
58
59SET(OpenThreads_SOURCE_DIR ${OpenSceneGraph_SOURCE_DIR})
60
61# We have some custom .cmake scripts not in the official distribution.
62# Maybe this can be used override existing behavior if needed?
63SET(CMAKE_MODULE_PATH "${OpenSceneGraph_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
64
65
66# Okay, here's the problem: On some platforms, linking against OpenThreads
67# is not enough and explicit linking to the underlying thread library
68# is also required (e.g. FreeBSD). But OpenThreads may be built with different
69# backends (Pthreads, Sproc, Windows) so we don't know what the underlying
70# thread library is because some platforms support multiple backends (e.g.
71# IRIX supports Sproc and Pthreads). Linking all libraries won't work
72# because the libraries may be incompatible.
73# So the current solution is to attempt best guess linking and exempt certain
74# cases. With IRIX, we're going to hope explicit linking to the underlying
75# library is not necessary. We currently don't case for pthreads on Windows
76# which might be an issue on things like Cygwin. This may need to be fixed.
77FIND_PACKAGE(Threads)
78IF(CMAKE_SYSTEM MATCHES IRIX)
79    # Erase CMAKE_THREAD_LIBS_INIT and hope it works
80    SET(CMAKE_THREAD_LIBS_INIT "" CACHE INTERNAL "")
81ENDIF()
82
83OPTION(OSG_MAINTAINER "Enable OpenSceneGraph maintainer build methods, such as making svn branches, tags, updating ChangeLog." OFF)
84IF (OSG_MAINTAINER)
85
86    SET(OPENSCENEGRAPH_SVN "trunk")
87    #SET(OPENSCENEGRAPH_SVN "branches")
88    SET(OPENSCENEGRAPH_BRANCH OpenSceneGraph-${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION})
89
90    #
91    # Provide target for tagging a release
92    #
93    SET(SVNCOMMAND svn)
94    SET(SVNTRUNKDIR     http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk)
95    SET(SVNTAGDIR       http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags)
96    SET(SVNBRANCHDIR    http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches)
97
98    IF   (OPENSCENEGRAPH_SVN STREQUAL "trunk")
99        SET(SVNSOURCEDIR ${SVNTRUNKDIR})
100    ELSE()
101        SET(SVNSOURCEDIR ${SVNBRANCHDIR}/${OPENSCENEGRAPH_BRANCH})
102    ENDIF()
103
104
105    IF   (OPENSCENEGRAPH_RELEASE_CANDIDATE EQUAL 0)
106        SET(RELEASE_NAME OpenSceneGraph-${OPENSCENEGRAPH_VERSION})
107    ELSE()
108        SET(RELEASE_NAME OpenSceneGraph-${OPENSCENEGRAPH_VERSION}-rc${OPENSCENEGRAPH_RELEASE_CANDIDATE})
109    ENDIF()
110
111
112    ADD_CUSTOM_TARGET(tag-test
113        COMMAND echo ${SVNCOMMAND} copy ${SVNSOURCEDIR} ${SVNTAGDIR}/${RELEASE_NAME} -m "Release ${RELEASE_NAME}"
114    )
115
116    ADD_CUSTOM_TARGET(tag-run
117        COMMAND ${SVNCOMMAND} copy ${SVNSOURCEDIR} ${SVNTAGDIR}/${RELEASE_NAME} -m "Release ${RELEASE_NAME}"
118    )
119
120    ADD_CUSTOM_TARGET(branch-test
121        COMMAND echo ${SVNCOMMAND} copy ${SVNSOURCEDIR} ${SVNBRANCHDIR}/${OPENSCENEGRAPH_BRANCH} -m "Branch ${OPENSCENEGRAPH_BRANCH}"
122    )
123
124    ADD_CUSTOM_TARGET(branch-run
125        COMMAND ${SVNCOMMAND} copy ${SVNSOURCEDIR} ${SVNBRANCHDIR}/${OPENSCENEGRAPH_BRANCH} -m "Branch ${OPENSCENEGRAPH_BRANCH}"
126    )
127
128    #
129    # Provide target for generating ChangeLog
130    #
131    SET(GENERATELOGS svn2cl)
132
133    ADD_CUSTOM_TARGET(ChangeLog
134        COMMAND ${SVNCOMMAND} update
135        COMMAND ${GENERATELOGS} ${SVNSOURCEDIR}
136    )
137   
138ENDIF(OSG_MAINTAINER)
139
140
141# Find OpenGL
142FIND_PACKAGE(OpenGL)
143
144IF(APPLE)
145    FIND_LIBRARY(CARBON_LIBRARY Carbon)
146    FIND_LIBRARY(COCOA_LIBRARY Cocoa)
147ENDIF()
148
149IF(UNIX)
150    # Not sure what this will do on Cygwin and Msys
151    # Also, remember OS X X11 is a user installed option so it may not exist.
152    FIND_PACKAGE(X11)
153    # Some Unicies need explicit linkage to the Math library or the build fails.
154    FIND_LIBRARY(MATH_LIBRARY m)
155ENDIF()
156
157# Make the headers visible to everything
158IF(NOT ${PROJECT_BINARY_DIR} EQUAL ${PROJECT_SOURCE_DIR})
159   INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include)
160ENDIF()
161
162INCLUDE_DIRECTORIES(
163    ${OpenSceneGraph_SOURCE_DIR}/include
164    ${OPENGL_INCLUDE_DIR}
165)
166
167# Common global definitions
168#ADD_DEFINITIONS(-D)
169# Platform specific definitions
170
171
172IF(WIN32)
173
174    IF(MSVC)
175        # This option is to enable the /MP switch for Visual Studio 2005 and above compilers
176        OPTION(WIN32_USE_MP "Set to ON to build OpenSceneGraph with the /MP option (Visual Studio 2005 and above)." OFF)
177        MARK_AS_ADVANCED(WIN32_USE_MP)
178        IF(WIN32_USE_MP)
179            SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
180        ENDIF(WIN32_USE_MP)
181
182        # turn off various warnings
183        # foreach(warning 4244 4251 4267 4275 4290 4786 4305 4996)
184        #     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd${warning}")
185        # endforeach(warning)
186
187        # This option is to enable the /DYNAMICBASE switch
188        # It is used to workaround a bug in Windows 7 when linking in release, which results in corrupt
189        # binaries. See this page for details: http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/01/24/the-case-of-the-corrupt-pe-binaries.aspx
190        OPTION(WIN32_USE_DYNAMICBASE "Set to ON to build OpenSceneGraph with the /DYNAMICBASE option to work around a bug when linking release executables on Windows 7." OFF)
191        MARK_AS_ADVANCED(WIN32_USE_DYNAMICBASE)
192        IF(WIN32_USE_DYNAMICBASE)
193            SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DYNAMICBASE")
194        ENDIF(WIN32_USE_DYNAMICBASE)
195
196        # More MSVC specific compilation flags
197        ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)
198        ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
199
200        OPTION(MSVC_DISABLE_CHECKED_ITERATORS "Set to ON to disable Visual C++ checked iterators. If you do this you must ensure that every other project in your solution and all dependencies are compiled with _SECURE_SCL=0." OFF)
201        MARK_AS_ADVANCED(MSVC_DISABLE_CHECKED_ITERATORS)
202        IF(MSVC_DISABLE_CHECKED_ITERATORS)
203            ADD_DEFINITIONS(-D_SECURE_SCL=0)
204        ENDIF(MSVC_DISABLE_CHECKED_ITERATORS)
205    ENDIF()
206
207    #needed for net plugin
208    SET (OSG_SOCKET_LIBS wsock32)
209    # Both Cygwin and Msys need -DNOMINMAX ???
210    IF(UNIX)
211        ADD_DEFINITIONS(-DNOMINMAX)
212    ENDIF()
213
214########################################################################################################
215# the following options are MSVC specific,
216# the first OSG_MSVC_VERSIONED_DLL activate a custom build-time layout that should allow to run examples and application
217# fron bin folder without requiring installation step.
218# it also prepend "osg${OPENSCENEGRAPH_SOVERSION}-" to only .dll files, leaving .lib files untouched in lib
219# it also use a hack to get rid of Debug and Release folder in MSVC projects
220# all the .dll and .pdb are in bin and all the .lib and .exp are in lib
221#
222# the second option disable incremental linking in debug build , that is enabled by default by CMake
223##########################################################################################################
224
225    IF(MSVC)
226        IF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4 AND ${CMAKE_PATCH_VERSION} LESS 7)
227            MESSAGE("Warning:  disabling versioned options 2.4.6 exibits inconsintencies in .pdb naming, at least under MSVC, suggested upgrading at least to 2.4.7")
228            SET(OSG_MSVC_VERSIONED_DLL OFF)
229            SET(OSG_MSVC_DEBUG_INCREMENTAL_LINK ON)
230        ELSE()
231            OPTION(OSG_MSVC_VERSIONED_DLL "Set to ON to build OpenSceneGraph with versioned dll names" ON)
232            MARK_AS_ADVANCED(OSG_MSVC_VERSIONED_DLL)
233            OPTION(OSG_MSVC_DEBUG_INCREMENTAL_LINK "Set to OFF to build OpenSceneGraph without incremental linking in debug (release is off by default)" ON)
234            MARK_AS_ADVANCED(OSG_MSVC_DEBUG_INCREMENTAL_LINK)
235            IF(NOT OSG_MSVC_DEBUG_INCREMENTAL_LINK)
236                SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
237                SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
238                SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
239            ENDIF(NOT OSG_MSVC_DEBUG_INCREMENTAL_LINK)
240        ENDIF()
241    ENDIF(MSVC)
242ENDIF(WIN32)
243
244########################################################################################################
245##### these were settings located in SetupCommon.cmake used in Luigi builds.... find out what are useful
246########################################################################################################
247#luigi#SET(CMAKE_VERBOSE_MAKEFILE TRUE)
248#luigi#SET(CMAKE_SKIP_RPATH TRUE)
249#luigi#SET(CMAKE_SKIP_RULE_DEPENDENCY TRUE)
250#luigi#IF(UNIX)
251#luigi#    LIST_CONTAINS(contains "g++" ${CMAKE_CXX_COMPILER_LIST})
252#luigi#    IF (contains)
253#luigi#        MESSAGE(${MY_MESSAGE_DEFAULT} "${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} setting  CMAKE_CXX_COMPILER to g++")
254#luigi#        SET(CMAKE_CXX_COMPILER "g++")
255#luigi#        SET(CMAKE_CXX_COMPILER_LOADED 2)
256#luigi#        SET(CMAKE_CXX_COMPILER_WORKS 2)
257#luigi#    ENDIF (contains)
258#luigi#    SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
259#luigi#    SET(CMAKE_CXX_FLAGS_DEBUG "-ggdb -gstabs")
260#luigi#ENDIF(UNIX)
261########################################################################################################
262
263OPTION(OSG_USE_FLOAT_MATRIX "Set to ON to build OpenSceneGraph with float Matrix instead of double." OFF)
264MARK_AS_ADVANCED(OSG_USE_FLOAT_MATRIX)
265
266OPTION(OSG_USE_FLOAT_PLANE "Set to ON to build OpenSceneGraph with float Plane instead of double." OFF)
267MARK_AS_ADVANCED(OSG_USE_FLOAT_PLANE)
268
269OPTION(OSG_USE_FLOAT_BOUNDINGSPHERE "Set to ON to build OpenSceneGraph with float BoundingSphere instead of double." ON)
270MARK_AS_ADVANCED(OSG_USE_FLOAT_BOUNDINGSPHERE)
271
272OPTION(OSG_USE_FLOAT_BOUNDINGBOX "Set to ON to build OpenSceneGraph with float BoundingBox instead of double." ON)
273MARK_AS_ADVANCED(OSG_USE_FLOAT_BOUNDINGBOX)
274
275OPTION(OSG_USE_UTF8_FILENAME "Set to ON to use a UTF8 locale for filenames instead of the default locale." OFF)
276MARK_AS_ADVANCED(OSG_USE_UTF8_FILENAME)
277
278OPTION(OSG_DISABLE_MSVC_WARNINGS "Set to OFF to not disable MSVC warnings generated by OSG headers." ON)
279MARK_AS_ADVANCED(OSG_DISABLE_MSVC_WARNINGS)
280
281OPTION(OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION "Set to ON to use the ref_ptr<> T* operator() output conversion. " ON)
282
283################################################################################
284# Set Config file
285
286SET(OPENSCENEGRAPH_CONFIG_HEADER "${PROJECT_BINARY_DIR}/include/osg/Config")
287CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/Config.in"
288               "${OPENSCENEGRAPH_CONFIG_HEADER}")
289# INSTALL_FILES(/include/osg/ FILES "${OPENSCENEGRAPH_CONFIG_HEADER}")
290
291
292################################################################################
293# Set Version Info resource file
294
295IF(MSVC)
296    SET(OPENSCENEGRAPH_VERSIONINFO_RC "${PROJECT_BINARY_DIR}/PlatformSpecifics/Windows/OpenSceneGraphVersionInfo.rc")
297    CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/PlatformSpecifics/Windows/OpenSceneGraphVersionInfo.rc.in"
298                   "${OPENSCENEGRAPH_VERSIONINFO_RC}")
299ENDIF()
300
301################################################################################
302# Optional build components
303
304# OSG Applications
305OPTION(BUILD_OSG_APPLICATIONS "Enable to build OSG Applications (e.g. osgviewer)" ON)
306
307# OSG Examples
308OPTION(BUILD_OSG_EXAMPLES "Enable to build OSG Examples" OFF)
309
310################################################################################
311# 3rd Party Dependency Stuff
312IF(WIN32)
313    INCLUDE(Find3rdPartyDependencies)
314ENDIF()
315
316# Common to all platforms:
317FIND_PACKAGE(FreeType)
318FIND_PACKAGE(Inventor)
319FIND_PACKAGE(Jasper)
320FIND_PACKAGE(OpenEXR)
321FIND_PACKAGE(COLLADA)
322FIND_PACKAGE(ZLIB)
323FIND_PACKAGE(Xine)
324FIND_PACKAGE(OpenVRML)
325FIND_PACKAGE(Performer)
326FIND_PACKAGE(GDAL)
327FIND_PACKAGE(CURL)
328FIND_PACKAGE(ITK)
329FIND_PACKAGE(LibVNCServer)
330FIND_PACKAGE(OurDCMTK)
331FIND_PACKAGE(OpenAL)
332FIND_PACKAGE(XUL)
333FIND_PACKAGE(FFmpeg)
334FIND_PACKAGE(SDL)
335
336#use pkg-config to find various modues
337INCLUDE(FindPkgConfig OPTIONAL)
338
339IF(PKG_CONFIG_FOUND)
340
341    INCLUDE(FindPkgConfig)
342
343    PKG_CHECK_MODULES(GTK gtk+-2.0)
344
345    IF(WIN32)
346        PKG_CHECK_MODULES(GTKGL gtkglext-win32-1.0)
347    ELSE()
348        PKG_CHECK_MODULES(GTKGL gtkglext-x11-1.0)
349    ENDIF()
350
351    PKG_CHECK_MODULES(RSVG librsvg-2.0)
352    PKG_CHECK_MODULES(CAIRO cairo)
353    PKG_CHECK_MODULES(POPPLER poppler-glib)
354
355ENDIF()
356
357
358#optional example related dependencies
359IF   (BUILD_OSG_EXAMPLES)
360
361
362    FIND_PACKAGE(FLTK)
363    FIND_PACKAGE(GLUT)
364    FIND_PACKAGE(FOX)
365
366    SET(wxWidgets_USE_LIBS base core gl net)
367    FIND_PACKAGE(wxWidgets)
368
369    # To select a specific version of QT define DESIRED_QT_VERSION
370    # via cmake -DDESIRED_QT_VERSION=4
371    IF  (DESIRED_QT_VERSION)
372
373        IF  (DESIRED_QT_VERSION MATCHES 4)
374          FIND_PACKAGE(Qt4)
375        ELSE()
376          FIND_PACKAGE(Qt3)
377        ENDIF()
378
379    ELSE()
380
381        FIND_PACKAGE(Qt4)
382
383        IF  (NOT QT4_FOUND)
384            FIND_PACKAGE(Qt3)
385        ENDIF()
386
387    ENDIF()
388
389ENDIF(BUILD_OSG_EXAMPLES)
390
391
392
393
394
395
396#
397# Test to determine if we want the "tripledot" form of the GLU tesselator callback.
398#
399IF(NOT DEFAULT_GLU_TESS_CALLBACK_TRIPLEDOT)
400    IF(WIN32 OR CMAKE_SYSTEM_NAME MATCHES "Linux")
401
402        # Skip the compile check for platforms that never need the variable
403        # form.
404        SET(DEFAULT_GLU_TESS_CALLBACK_TRIPLEDOT false)
405
406    ELSE()
407
408        # For other platforms perform the check
409        INCLUDE(CheckCXXSourceCompiles)
410        SET(CMAKE_REQUIRED_DEFINITIONS -DGLU_TESS_CALLBACK_TRIPLEDOT)
411        SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/include ${GLUT_INCLUDE_DIR} ${GL_INCLUDE_DIR})
412        SET(CMAKE_REQUIRED_LIBRARIES ${GLUT_LIBRARY} ${GL_LIBRARY})
413        CHECK_CXX_SOURCE_COMPILES(
414            "#include <osg/GL>
415            #include <osg/GLU>
416            static void testcb(GLvoid *, void*) { }
417            int main() {
418               GLUtesselator *t = gluNewTess();
419               gluTessCallback(t, GLU_TESS_VERTEX_DATA, (GLU_TESS_CALLBACK) testcb);
420               return 0;
421            }"
422            GLU_Tesselator_Needs_Variable_Parameter_Callback_Convention_Failure_Means_No)
423        SET(DEFAULT_GLU_TESS_CALLBACK_TRIPLEDOT
424            ${GLU_Tesselator_Needs_Variable_Parameter_Callback_Convention_Failure_Means_No})
425
426    ENDIF()
427ENDIF()
428
429OPTION(OSG_GLU_TESS_CALLBACK_TRIPLEDOT "Set to ON to build with variable parameter (...) version of GLU tesselator callback" ${DEFAULT_GLU_TESS_CALLBACK_TRIPLEDOT})
430IF(OSG_GLU_TESS_CALLBACK_TRIPLEDOT)
431    ADD_DEFINITIONS(-DGLU_TESS_CALLBACK_TRIPLEDOT)
432ENDIF(OSG_GLU_TESS_CALLBACK_TRIPLEDOT)
433
434# Platform specific:
435# (We can approach this one of two ways. We can try to FIND everything
436# and simply check if we found the packages before actually building
437# or we can hardcode the cases. The advantage of the former is that
438# packages that are installed on platforms that don't require them
439# will still get built (presuming no compatibility issues). But this
440# also means modules that are redundant may get built. For example,
441# OS X doesn't need GIF, JPEG, PNG, TIFF, etc because it uses QuickTime.
442# Also, it will clutter the CMake menu with "NOT_FOUND".
443# The downside to the latter is that it is harder to build those
444# potentially redundant modules.)
445
446# Image readers/writers depend on 3rd party libraries except for OS X which
447# can use Quicktime.
448IF(NOT APPLE)
449    FIND_PACKAGE(GIFLIB)
450    FIND_PACKAGE(JPEG)
451    FIND_PACKAGE(PNG)
452    FIND_PACKAGE(TIFF)
453
454    # QuickTime is required for OS X, but optional for Windows.
455    IF(WIN32)
456        FIND_PACKAGE(QuickTime)
457    ENDIF()
458
459ELSE()
460    FIND_PACKAGE(QuickTime)
461ENDIF()
462
463################################################################################
464# Create bin and lib directories if required
465
466IF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
467   FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin ${CMAKE_BINARY_DIR}/lib ${CMAKE_BINARY_DIR}/lib/${OSG_PLUGINS})
468ENDIF()
469
470
471################################################################################
472# Installation stuff
473
474SET(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "add a postfix, usually d on windows")
475ADD_DEFINITIONS(-DOSG_DEBUG_POSTFIX=${CMAKE_DEBUG_POSTFIX})
476
477IF(UNIX AND NOT WIN32)
478  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
479  SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
480ENDIF()
481
482IF(CYGWIN)
483  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
484  SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
485ENDIF()
486
487IF(UNIX AND NOT WIN32 AND NOT APPLE)
488  IF(CMAKE_SIZEOF_VOID_P MATCHES "8")
489      SET(LIB_POSTFIX "64" CACHE STRING "suffix for 32/64 dir placement")
490      MARK_AS_ADVANCED(LIB_POSTFIX)
491  ENDIF()
492ENDIF()
493IF(NOT DEFINED LIB_POSTFIX)
494    SET(LIB_POSTFIX "")
495ENDIF()
496
497# Here we apparantly do some funky stuff with making the bin/ and lib/
498# folders which is probably needed to work around a very old CMake bug?
499
500#SET(OUTPUT_BINDIR ${PROJECT_BINARY_DIR}/bin/${CMAKE_SYSTEM_NAME})
501SET(OUTPUT_BINDIR ${PROJECT_BINARY_DIR}/bin)
502MAKE_DIRECTORY(${OUTPUT_BINDIR})
503IF(MSVC AND NOT MSVC_IDE)
504    MAKE_DIRECTORY(${OUTPUT_BINDIR}/${OSG_PLUGINS})
505ENDIF(MSVC AND NOT MSVC_IDE)
506
507#SET(OUTPUT_LIBDIR ${PROJECT_BINARY_DIR}/lib/${CMAKE_SYSTEM_NAME})
508SET(OUTPUT_LIBDIR ${PROJECT_BINARY_DIR}/lib)
509MAKE_DIRECTORY(${OUTPUT_LIBDIR})
510IF(NOT MSVC)
511    MAKE_DIRECTORY(${OUTPUT_LIBDIR}/${OSG_PLUGINS})
512ENDIF(NOT MSVC)
513
514# On CMake 2.4.x use EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH and later
515# we work around the DLL placement by use of the PREFIX target property hack
516#
517# On CMake 2.6.x use the newly minted CMAKE_LIBRARY_OUTPUT_DIRECTORY,
518# CMAKE_ARCHIVE_OUTPUT_DIRECTORY & CMAKE_RUNTIME_OUTPUT_DIRECTORY
519
520IF(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 5)
521    SET(EXECUTABLE_OUTPUT_PATH ${OUTPUT_BINDIR})
522    SET(LIBRARY_OUTPUT_PATH    ${OUTPUT_LIBDIR})
523ELSE()
524    # If CMake >= 2.6.0
525    SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_LIBDIR})
526    SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_BINDIR})
527    IF(WIN32)
528        SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_BINDIR})
529    ELSE(WIN32)
530        SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_LIBDIR})
531    ENDIF(WIN32)
532ENDIF()
533
534#SET(INSTALL_BINDIR OpenSceneGraph/bin)
535#SET(INSTALL_INCDIR OpenSceneGraph/include)
536#SET(INSTALL_LIBDIR OpenSceneGraph/lib)
537#SET(INSTALL_DOCDIR OpenSceneGraph/doc)
538
539################################################################################
540# User Options
541
542
543# Expose CMAKE_INCLUDE_PATH and CMAKE_LIBARY_PATH to the GUI so users
544# may set these values without needing to manipulate the environment.
545SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} CACHE STRING "You may add additional search paths here. Use ; to separate multiple paths.")
546SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} CACHE STRING "You may add additional search paths here. Use ; to separate multiple paths.")
547# We are proposing that a new variable called CMAKE_PREFIX_PATH be introduced
548# to CMake to compliment CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH.
549# A formal feature request has been submited to CMake, Bug #4947.
550# It is intended for those users who have common prefixes for their INCLUDE
551# and LIBRARY locations. So if users have headers in /usr/local/include
552# and libraries in /usr/local/lib, the common prefix is /usr/local.
553# It should also cover the case where headers and libraries are
554# in the same directory.
555# Our proposal expects that FIND_* commands will automatically search for
556# CMAKE_PREFIX_PATH right after CMAKE_INCLUDE_PATH or CMAKE_LIBRARY_PATH.
557# Obviously, since CMake does not currently support this, we must write
558# our Find*.cmake modules to explicitly support this. Otherwise, this variable
559# will have no impact.
560# This is unofficial so this may be removed or changed at anytime.
561SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} CACHE STRING "(EXPERIMENTAL) You may add additional search paths here. Use ; to separate multiple paths.")
562
563# This is for an advanced option to give aggressive warnings
564# under different compilers. If yours is not implemented, this option
565# will not be made available.
566IF(CMAKE_COMPILER_IS_GNUCXX)
567    # To be complete, we might also do GNUCC flags,
568    # but everything here is C++ code.
569    # -Wshadow and -Woverloaded-virtual are also interesting flags, but OSG
570    # returns too many hits.
571    # FYI, if we do implement GNUCC, then -Wmissing-prototypes in another
572    # interesting C-specific flag.
573    # Also, there is a bug in gcc 4.0. Under C++, -pedantic will create
574    # errors instead of warnings for certain issues, including superfluous
575    # semicolons and commas, and the use of long long. -fpermissive seems
576    # to be the workaround.
577    SET(OSG_AGGRESSIVE_WARNING_FLAGS -Wall -Wparentheses -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -fpermissive)
578
579    # Previous included -Wformat=2 in OSG_AGGRESSIVE_WARNING_FLAGS but had to remove it due to standard library errors
580
581
582ELSE()
583    IF(MSVC)
584        # FIXME: What are good aggressive warning flags for Visual Studio?
585        # And do we need to further subcase this for different versions of VS?
586        # CMake variables: MSVC60, MSVC70, MSVC71, MSVC80, CMAKE_COMPILER_2005
587        SET(OSG_AGGRESSIVE_WARNING_FLAGS /W4 /wd4706 /wd4127 /wd4100)
588
589
590    ELSE()
591        # CMake lacks an elseif, so other non-gcc, non-VS compilers need
592        # to be listed below. If unhandled, OSG_AGGRESSIVE_WARNING_FLAGS should
593        # remain unset.
594    ENDIF()
595ENDIF()
596
597# This part is for the CMake menu option to toggle the warnings on/off.
598# This will only be made available if we set values for OSG_AGGRESSIVE_WARNING_FLAGS.
599IF(OSG_AGGRESSIVE_WARNING_FLAGS)
600
601    IF (APPLE)
602        SET(DEFAULT_USE_AGGRESSIVE_WARNINGS OFF)
603    ELSE()
604        SET(DEFAULT_USE_AGGRESSIVE_WARNINGS ON)
605    ENDIF()
606
607    OPTION(OSG_USE_AGGRESSIVE_WARNINGS "Enable to activate aggressive warnings" ${DEFAULT_USE_AGGRESSIVE_WARNINGS})
608    MARK_AS_ADVANCED(OSG_USE_AGGRESSIVE_WARNINGS)
609
610    IF(OSG_USE_AGGRESSIVE_WARNINGS)
611        # Add flags defined by OSG_AGGRESSIVE_WARNING_FLAGS if they aren't already there
612        FOREACH(flag ${OSG_AGGRESSIVE_WARNING_FLAGS})
613            IF(NOT CMAKE_CXX_FLAGS MATCHES "${flag}")
614                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
615            ENDIF()
616        ENDFOREACH()
617    ELSE()
618        # Remove all flags considered aggresive
619        FOREACH(flag ${OSG_AGGRESSIVE_WARNING_FLAGS})
620            STRING(REGEX REPLACE "${flag}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
621        ENDFOREACH()
622    ENDIF()
623ENDIF()
624
625
626# Dynamic vs Static Linking
627OPTION(DYNAMIC_OPENSCENEGRAPH "Set to ON to build OpenSceneGraph for dynamic linking.  Use OFF for static." ON)
628IF   (DYNAMIC_OPENSCENEGRAPH)
629    SET(OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC "SHARED")
630ELSE ()
631    SET(OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC "STATIC")
632ENDIF()
633
634INCLUDE(OsgMacroUtils)
635# OSG Core
636ADD_SUBDIRECTORY(src)
637
638IF   (BUILD_OSG_APPLICATIONS)
639    ADD_SUBDIRECTORY(applications)
640ENDIF()
641
642IF   (BUILD_OSG_EXAMPLES)
643    ADD_SUBDIRECTORY(examples)
644ENDIF()
645
646
647# Set defaults for Universal Binaries. We want 32-bit Intel/PPC on 10.4
648# and 32/64-bit Intel/PPC on >= 10.5. Anything <= 10.3 doesn't support.
649IF(APPLE)
650    # These are just defaults/recommendations, but how we want to build
651    # out of the box. But the user needs to be able to change these options.
652    # So we must only set the values the first time CMake is run, or we
653    # will overwrite any changes the user sets.
654    # FORCE is used because the options are not reflected in the UI otherwise.
655    # Seems like a good place to add version specific compiler flags too.
656    IF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE)
657        # This is really fragile, but CMake doesn't provide the OS system
658        # version information we need. (Darwin versions can be changed
659        # independently of OS X versions.)
660        # It does look like CMake handles the CMAKE_OSX_SYSROOT automatically.
661        IF(EXISTS /Developer/SDKs/MacOSX10.5.sdk)
662            # 64-bit compiles are not supported with Carbon. We should enable
663            # 64-bit compilation by default once osgviewer has been
664            # rewritten with Cocoa.
665            #SET(CMAKE_OSX_ARCHITECTURES "ppc;i386;ppc64;x86_64" CACHE STRING "Build architectures for OSX" FORCE)
666            SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
667            SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.5 -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
668        ELSEIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
669            SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
670            SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.4 -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
671        ELSE()
672            # No Universal Binary support
673            # Should break down further to set the -mmacosx-version-min,
674            # but the SDK detection is too unreliable here.
675        ENDIF()
676    ENDIF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE)
677
678    OPTION(OSG_BUILD_APPLICATION_BUNDLES "Enable the building of applications and examples as OSX Bundles" OFF)
679
680ENDIF(APPLE)
681
682
683#
684# Provide target for generating wrappers
685#
686SET(GENWRAPPER genwrapper)
687
688ADD_CUSTOM_TARGET(wrappers
689    COMMAND ${GENWRAPPER} -c ${OpenSceneGraph_SOURCE_DIR}/src/osgWrappers/genwrapper.conf -t ${OpenSceneGraph_SOURCE_DIR}/src/osgWrappers/Doxyfile.template -d ${OpenSceneGraph_SOURCE_DIR} | doxygen -
690    COMMAND ${GENWRAPPER} -c ${OpenSceneGraph_SOURCE_DIR}/src/osgWrappers/genwrapper.conf -l ${OpenSceneGraph_SOURCE_DIR}
691)
692
693# For Doxygen
694INCLUDE(${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL)
695OPTION(BUILD_DOCUMENTATION "Build OpenSceneGraph reference documentation using doxygen (use: make DoxygenDoc)" OFF)
696MARK_AS_ADVANCED(CLEAR BUILD_DOCUMENTATION)
697# To build the documention, you will have to enable it
698# and then do the equivalent of "make DoxygenDoc".
699IF(BUILD_DOCUMENTATION)
700
701    OPTION(BUILD_REF_DOCS_SEARCHENGINE "Enable doxygen's search engine (requires that documentation to be installed on a php enabled web server)" OFF)
702    IF(BUILD_REF_DOCS_SEARCHENGINE)
703        SET(SEARCHENGINE YES)
704    ELSE()
705        SET(SEARCHENGINE NO)
706    ENDIF()
707
708    OPTION(BUILD_REF_DOCS_TAGFILE "Generate a tag file named osg.tag on the documentation web server" OFF)
709    IF(BUILD_REF_DOCS_TAGFILE)
710        SET(GENERATE_TAGFILE "${OpenSceneGraph_BINARY_DIR}/doc/OpenSceneGraphReferenceDocs/osg.tag")
711    ELSE()
712        SET(GENERATE_TAGFILE "")
713    ENDIF()
714
715    IF(DOT)
716        SET(HAVE_DOT YES)
717    ELSE()
718        SET(HAVE_DOT NO)
719    ENDIF()
720   
721    # If html help generation was requested. DOCUMENTATION_HTML_HELP is defined by Documentation.cmake
722    SET(GENERATE_HTMLHELP "NO")
723    IF(DOCUMENTATION_HTML_HELP)
724        # on windows Documentation.cmake finds the html help workshop fi it exists. On u*ix we might have it with wine but no way to point it out
725        IF(NOT WIN32)
726            SET(HTML_HELP_COMPILER "" CACHE FILEPATH "Enter location of the HTML help compiler to let doxygen compile html")
727            MARK_AS_ADVANCED(HTML_HELP_COMPILER)
728        ENDIF()
729        # this var sets a proper value in .doxygen files when coniguring them below
730        SET(GENERATE_HTMLHELP "YES")
731    endif()
732 
733    # This processes our doxyfile.cmake and substitutes paths to generate
734    # a final Doxyfile
735    CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/doc/Doxyfiles/doxyfile.cmake
736        ${PROJECT_BINARY_DIR}/doc/openscenegraph.doxyfile
737    )
738    # copy the osg logo to documentations target folder
739    CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/PlatformSpecifics/Windows/icons/src/osg32-32.png
740        ${PROJECT_BINARY_DIR}/doc/OpenSceneGraphReferenceDocs/osg32-32.png COPYONLY
741    )
742    #INSTALL(FILES ${PROJECT_BINARY_DIR}/doc/${PROJECT_NAME}ReferenceDocs-${OPENSCENEGRAPH_VERSION}.chm DESTINATION doc OPTIONAL COMPONENT openscenegraph-doc)
743    INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/doc/OpenSceneGraphReferenceDocs DESTINATION doc COMPONENT openscenegraph-doc)
744
745    # now set up openthreads documentation generation
746    IF(BUILD_REF_DOCS_TAGFILE)
747        SET(GENERATE_TAGFILE "${OpenSceneGraph_BINARY_DIR}/doc/OpenThreadsReferenceDocs/ot.tag")
748    ENDIF()
749
750    # This processes our openthreads.doxyfile.cmake and generate a final doxyfile
751    CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/doc/Doxyfiles/openthreads.doxyfile.cmake
752        ${PROJECT_BINARY_DIR}/doc/openthreads.doxyfile
753    )
754    # copy the osg logo to documentations target folder
755    CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/PlatformSpecifics/Windows/icons/src/osg32-32.png
756        ${PROJECT_BINARY_DIR}/doc/OpenThreadsReferenceDocs/osg32-32.png COPYONLY
757    )
758    #INSTALL(FILES ${PROJECT_BINARY_DIR}/doc/${PROJECT_NAME}ReferenceDocs-${OPENSCENEGRAPH_VERSION}.chm DESTINATION doc OPTIONAL COMPONENT openscenegraph-doc)
759    INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/doc/OpenThreadsReferenceDocs DESTINATION doc COMPONENT openthreads-doc)
760
761    # Process our other doxyfiles but don't create targets for these
762    CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/doc/Doxyfiles/all_Doxyfile
763        ${PROJECT_BINARY_DIR}/doc/all_Doxyfile)
764    CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/doc/Doxyfiles/auto_Doxyfile
765        ${PROJECT_BINARY_DIR}/doc/auto_Doxyfile)
766    CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/doc/Doxyfiles/core_Doxyfile
767        ${PROJECT_BINARY_DIR}/doc/core_Doxyfile)
768   
769    # This creates a new target to build documentation.
770    # It runs ${DOXYGEN} which is the full path and executable to
771    # Doxygen on your system, set by the FindDoxygen.cmake module
772    # (called by FindDocumentation.cmake).
773    # It runs the final generated Doxyfile against it.
774    # The DOT_PATH is substituted into the Doxyfile.
775    ADD_CUSTOM_TARGET(doc_openscenegraph ${DOXYGEN}
776        ${PROJECT_BINARY_DIR}/doc/openscenegraph.doxyfile
777    )
778    ADD_CUSTOM_TARGET(doc_openthreads ${DOXYGEN}
779        ${PROJECT_BINARY_DIR}/doc/openthreads.doxyfile
780    )
781ENDIF(BUILD_DOCUMENTATION)
782
783OPTION(BUILD_DASHBOARD_REPORTS "Set to ON to activate reporting of OpenSceneGraph builds here http://www.cdash.org/CDashPublic/index.php?project=OpenSceneGraph" OFF)
784IF(BUILD_DASHBOARD_REPORTS)
785# The following are required to uses Dart and the Cdash dashboard
786# viewable here : http://www.cdash.org/CDashPublic/index.php?project=OpenSceneGraph
787    INCLUDE(Dart)
788ENDIF()
789
790# present the packaging option only if we have the cpack command defined (effectively >= 2.6.0)
791IF(CMAKE_CPACK_COMMAND)
792    OPTION(BUILD_OSG_PACKAGES "Set to ON to generate CPack configuration files and packaging targets" OFF)
793    IF(BUILD_OSG_PACKAGES)
794      INCLUDE(OsgCPack)
795    ENDIF()
796ENDIF()
797
798# Generate pkg-config configuration file
799
800CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/packaging/pkgconfig/openscenegraph.pc.in
801        ${PROJECT_BINARY_DIR}/packaging/pkgconfig/openscenegraph.pc
802    @ONLY
803    )
804
805INSTALL(FILES ${PROJECT_BINARY_DIR}/packaging/pkgconfig/openscenegraph.pc DESTINATION lib${LIB_POSTFIX}/pkgconfig COMPONENT libopenscenegraph-dev)
806
807# Run this as late as possible so users can easier spot the message
808IF (NOT DEFINED REQUIRES_LIBPATH_MESSAGE AND ${CMAKE_INSTALL_PREFIX} STREQUAL "/usr/local")
809    SET(REQUIRES_LIBPATH_MESSAGE ON)
810ENDIF()
811
812IF(REQUIRES_LIBPATH_MESSAGE)
813    IF (NOT OSG_LIBPATH_MESSAGE_HAS_BEEN_RUN_BEFORE)
814        SET(OSG_LIBPATH_MESSAGE_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether the libpath message has been reported before")
815
816        MESSAGE("\nThe build system is configured to instal libraries to ${CMAKE_INSTALL_PREFIX}/lib${LIB_POSTFIX}\n"
817            "Your applications may not be able to find your installed libraries unless you:\n"
818            "    set your LD_LIBRARY_PATH (user specific) or\n"
819            "    update your ld.so configuration (system wide)")
820        IF(IS_DIRECTORY /etc/ld.so.conf.d)
821            MESSAGE("You have an ld.so.conf.d directory on your system, so if you wish to ensure that\n"
822                "applications find the installed osg libraries, system wide, you could install a\n"
823                "openscenegraph specific ld.so configuration with:\n"
824                "    sudo make install_ld_conf\n")
825            CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/packaging/ld.so.conf.d/openscenegraph.conf.in
826                ${PROJECT_BINARY_DIR}/packaging/ld.so.conf.d/openscenegraph.conf
827            )
828            ADD_CUSTOM_TARGET(install_ld_conf ${CMAKE_COMMAND} -E copy_if_different
829                ${PROJECT_BINARY_DIR}/packaging/ld.so.conf.d/openscenegraph.conf
830                /etc/ld.so.conf.d/openscenegraph.conf
831                COMMAND ldconfig
832                COMMENT "Copying openscenegraph.conf to /etc/ld.so.conf.d and running ldconfig"
833            )
834        ELSE()
835            IF(EXISTS /etc/ld.so.conf)
836                MESSAGE("You have an ld.so.conf file in /etc, if you wish to ensure \n"
837                "that applications find the installed osg libraries, system wide, you\n"
838                "could add ${CMAKE_INSTALL_PREFIX}/lib${LIB_POSTFIX} to it.")
839            ENDIF()
840        ENDIF()
841
842        # emit a message during installation.
843        INSTALL(CODE "MESSAGE(\"Libraries were installed to ${CMAKE_INSTALL_PREFIX}lib${LIB_POSTFIX}.\\nYou may need to update your ld.so configuration. \")")
844
845    ENDIF(NOT OSG_LIBPATH_MESSAGE_HAS_BEEN_RUN_BEFORE)
846
847ELSE()
848    SET(OSG_LIBPATH_MESSAGE_HAS_BEEN_RUN_BEFORE 0 CACHE INTERNAL "Flag to track whether the libpath message has been reported before")
849ENDIF()
850
851
852# This needs to be run very last so other parts of the scripts can take
853# advantage of this.
854IF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE)
855    SET(OSG_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before")
856ENDIF()
857
858#-----------------------------------------------------------------------------
859### uninstall target
860#-----------------------------------------------------------------------------
861CONFIGURE_FILE(
862  "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/cmake_uninstall.cmake.in"
863  "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
864  IMMEDIATE @ONLY)
865ADD_CUSTOM_TARGET(uninstall
866  "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
Note: See TracBrowser for help on using the browser.