diff --git a/CMakeLists.txt b/CMakeLists.txt index 2572343..f2a012d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,12 @@ +# Set minimum CMake version, this number may change depending on features used! (We should really change this to the absolute minimum to get this file to build) cmake_minimum_required (VERSION 3.6) project(swm_project DESCRIPTION "swm (swim) is a simple dynamic window manager.") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake") +# We need the XCB version of Xinerama, set this to off as this feature isn't truly implemented +option(XINERAMA "Allow multimonitor support via the common x extension xinerama." OFF) + add_executable(swm src/main.cpp) find_package(xcb REQUIRED) @@ -17,5 +21,11 @@ target_include_directories(swm PUBLIC include) target_link_libraries(swm PUBLIC ${XCB_LIBRARIES}) target_link_libraries(swm PUBLIC toml11::toml11) +# TODO: Link the XCB-Xinerama library to our project, but since we aren't using it I'm leaving it out for now. +if (XINERAMA) + # define this so we can use ifdef for this feature. + add_compile_definitions(XINERAMA) +endif() + # Set standard to C++20 set_target_properties(swm PROPERTIES CXX_STANDARD 20 CXX_EXTENSIONS OFF) \ No newline at end of file