fixed: auto_ptr -> unique_ptr
[opensg.git] / CMake / OSGCommonOptions.cmake
blob5e9cf8dad7b6925f5c10dcfd074ba30aa6d91eee
2 IF(NOT WIN32)
3   IF(OSG_BUILD_DEPENDEND)
4     # Hide it from further manipulation
5     SET(OSG_BUILD_DEPENDEND ${OSG_BUILD_DEPENDEND} CACHE INTERNAL "")
6   ENDIF(OSG_BUILD_DEPENDEND)
7 ENDIF(NOT WIN32)
9 MACRO(OSG_COMMON_OPTIONS)
11   SET(BUILD_SHARED_LIBS ON CACHE INTERNAL 
12                         "Set to OFF to build static libraries")
14   OPTION(OSGBUILD_TESTS   "Build test programs" ON   )
16   OPTION(OSG_ENABLE_SSE2  ""    OFF            )
17   OPTION(OSG_ENABLE_SSE4  ""    ON             )
18   SET   (OSG_SSE4_VARIANT "4.2" CACHE STRING "")
19   OPTION(OSG_ENABLE_AVX   ""    OFF            )
20   SET   (OSG_AVX_VARIANT  ""    CACHE STRING "")
21   OPTION(OSG_ENABLE_FMA   ""    OFF            )
22   OPTION(OSG_ENABLE_ABI6  ""    OFF            )
23   OPTION(OSG_ENABLE_C++11 ""    ON             )
25 ENDMACRO()
27 MACRO(OSG_COMMON_OPTIONS_CONFIGURED)
29   OPTION(OSG_ENABLE_CUDA "Build OpenSG with CUDA support" OFF)
31 ENDMACRO()
33 MACRO(OSG_COMMON_OPTIONS_DEPRECATED)
35 ENDMACRO()
37 MACRO(OSG_CONFIGURE_SUPPORT)
39   FILE(STRINGS ${OpenSG_DIR}/include/OpenSG/OSGConfigured.h 
40                _OSG_INC_GLEW
41                REGEX "^#define OSG_GL_INCLUDE_GLEW 1")
43   IF(_OSG_INC_GLEW)
45     IF(WIN32 OR _OSG_INC_GLEW)
46       OSG_CONFIGURE_GLEW()
48       IF(_OSG_INC_GLEW AND GLEW_FOUND)
49         LIST(APPEND OSG_GLOBAL_DEP_INCDIR GLEW_INCLUDE_DIR)
50       ENDIF()
52     ENDIF(WIN32 OR _OSG_INC_GLEW)
53   ENDIF()
55 ENDMACRO()