Make glx and shm cmake options
This commit is contained in:
@@ -4,7 +4,6 @@ set(SOURCES
|
|||||||
Drawing.cpp
|
Drawing.cpp
|
||||||
Extensions.cpp
|
Extensions.cpp
|
||||||
ExtBigReg.cpp
|
ExtBigReg.cpp
|
||||||
ExtGLX.cpp
|
|
||||||
ExtRANDR.cpp
|
ExtRANDR.cpp
|
||||||
Font.cpp
|
Font.cpp
|
||||||
Image.cpp
|
Image.cpp
|
||||||
@@ -12,11 +11,19 @@ set(SOURCES
|
|||||||
SafeGetters.cpp
|
SafeGetters.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
include(CheckSymbolExists)
|
option(ENABLE_GLX "enable glx extension" ON)
|
||||||
|
|
||||||
|
include(CheckSymbolExists)
|
||||||
|
include(CMakeDependentOption)
|
||||||
check_symbol_exists(shmat "sys/shm.h" HAVE_SHMAT)
|
check_symbol_exists(shmat "sys/shm.h" HAVE_SHMAT)
|
||||||
check_symbol_exists(shmdt "sys/shm.h" HAVE_SHMDT)
|
check_symbol_exists(shmdt "sys/shm.h" HAVE_SHMDT)
|
||||||
if(HAVE_SHMAT AND HAVE_SHMDT)
|
cmake_dependent_option(ENABLE_SHM "enable shm extension" ON "HAVE_SHMAT;HAVE_SHMDT" OFF)
|
||||||
|
|
||||||
|
if(ENABLE_GLX)
|
||||||
|
set(SOURCES ${SOURCES} ExtGLX.cpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_SHM)
|
||||||
set(SOURCES ${SOURCES} ExtSHM.cpp)
|
set(SOURCES ${SOURCES} ExtSHM.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user