Mercurial > hg > orthanc-stone
comparison Resources/CMake/OrthancStoneConfiguration.cmake @ 613:412a2d01a189
automatic initialization of glew
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Apr 2019 16:44:23 +0200 |
parents | 0c4c0693b97c |
children | 97926984d5d0 |
comparison
equal
deleted
inserted
replaced
612:ba72bffceb7d | 613:412a2d01a189 |
---|---|
86 if (ENABLE_SDL AND ENABLE_QT) | 86 if (ENABLE_SDL AND ENABLE_QT) |
87 message("SDL and QT may not be defined together") | 87 message("SDL and QT may not be defined together") |
88 elseif(ENABLE_SDL) | 88 elseif(ENABLE_SDL) |
89 message("SDL is enabled") | 89 message("SDL is enabled") |
90 include(${CMAKE_CURRENT_LIST_DIR}/SdlConfiguration.cmake) | 90 include(${CMAKE_CURRENT_LIST_DIR}/SdlConfiguration.cmake) |
91 add_definitions(-DORTHANC_ENABLE_NATIVE=1) | 91 add_definitions( |
92 add_definitions(-DORTHANC_ENABLE_QT=0) | 92 -DORTHANC_ENABLE_NATIVE=1 |
93 add_definitions(-DORTHANC_ENABLE_SDL=1) | 93 -DORTHANC_ENABLE_QT=0 |
94 -DORTHANC_ENABLE_SDL=1 | |
95 ) | |
94 elseif(ENABLE_QT) | 96 elseif(ENABLE_QT) |
95 message("QT is enabled") | 97 message("QT is enabled") |
96 include(${CMAKE_CURRENT_LIST_DIR}/QtConfiguration.cmake) | 98 include(${CMAKE_CURRENT_LIST_DIR}/QtConfiguration.cmake) |
97 add_definitions(-DORTHANC_ENABLE_NATIVE=1) | 99 add_definitions( |
98 add_definitions(-DORTHANC_ENABLE_QT=1) | 100 -DORTHANC_ENABLE_NATIVE=1 |
99 add_definitions(-DORTHANC_ENABLE_SDL=0) | 101 -DORTHANC_ENABLE_QT=1 |
102 -DORTHANC_ENABLE_SDL=0 | |
103 ) | |
100 else() | 104 else() |
101 message("SDL and QT are both disabled") | 105 message("SDL and QT are both disabled") |
102 unset(USE_SYSTEM_SDL CACHE) | 106 unset(USE_SYSTEM_SDL CACHE) |
103 add_definitions(-DORTHANC_ENABLE_SDL=0) | 107 add_definitions( |
104 add_definitions(-DORTHANC_ENABLE_QT=0) | 108 -DORTHANC_ENABLE_SDL=0 |
105 add_definitions(-DORTHANC_ENABLE_NATIVE=0) | 109 -DORTHANC_ENABLE_QT=0 |
110 -DORTHANC_ENABLE_NATIVE=0 | |
111 ) | |
112 endif() | |
113 | |
114 | |
115 if (ENABLE_OPENGL AND CMAKE_SYSTEM_NAME STREQUAL "Windows") | |
116 include(${CMAKE_CURRENT_LIST_DIR}/GlewConfiguration.cmake) | |
117 add_definitions( | |
118 -DORTHANC_ENABLE_GLEW=1 | |
119 ) | |
120 else() | |
121 add_definitions( | |
122 -DORTHANC_ENABLE_GLEW=0 | |
123 ) | |
106 endif() | 124 endif() |
107 | 125 |
108 | 126 |
109 if (ENABLE_OPENGL) | 127 if (ENABLE_OPENGL) |
110 include(FindOpenGL) | 128 include(FindOpenGL) |
398 | 416 |
399 # Optional components | 417 # Optional components |
400 ${SDL_SOURCES} | 418 ${SDL_SOURCES} |
401 ${QT_SOURCES} | 419 ${QT_SOURCES} |
402 ${BOOST_EXTENDED_SOURCES} | 420 ${BOOST_EXTENDED_SOURCES} |
421 ${GLEW_SOURCES} | |
403 ) | 422 ) |
404 | 423 |
405 | 424 |
406 if (ENABLE_OPENGL) | 425 if (ENABLE_OPENGL) |
407 list(APPEND ORTHANC_STONE_SOURCES | 426 list(APPEND ORTHANC_STONE_SOURCES |