stuff-from-scratch/src/windows/CMakeLists.txt
2021-10-31 13:04:48 +00:00

52 lines
No EOL
1.9 KiB
CMake

set (platform_INCLUDES "")
set (platform_LIBS "")
if(UNIX)
list(APPEND platform_INCLUDES
ui_interfaces/x11/XcbInterface.cpp
ui_interfaces/x11/XcbEventInterface.cpp
ui_interfaces/x11/XcbWindow.cpp
ui_interfaces/x11/XcbScreen.cpp
ui_interfaces/x11/XcbWindowInterface.cpp
ui_interfaces/x11/XcbLayerInterface.cpp
ui_interfaces/x11/XcbTextInterface.cpp
ui_interfaces/x11/XcbKeyboard.cpp
ui_interfaces/x11/GlxInterface.cpp)
list(APPEND platform_LIBS
X11 X11-xcb xcb )
else()
list(APPEND platform_INCLUDES
ui_interfaces/win32/Win32UIInterface.h
ui_interfaces/win32/Win32UIInterface.cpp
ui_interfaces/win32/Win32WindowInterface.h
ui_interfaces/win32/Win32WindowInterface.cpp
ui_interfaces/win32/Win32Window.h
ui_interfaces/win32/Win32Window.cpp
)
endif()
list(APPEND windows_LIB_INCLUDES
managers/WindowManager.cpp
managers/DesktopManager.cpp
managers/EventManager.cpp)
# add the library
add_library(windows SHARED ${windows_LIB_INCLUDES} ${platform_INCLUDES})
target_include_directories(windows PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/managers"
"${CMAKE_CURRENT_SOURCE_DIR}/ui_interfaces/x11"
"${CMAKE_CURRENT_SOURCE_DIR}/ui_interfaces/win32"
"${PROJECT_SOURCE_DIR}/src/core"
"${PROJECT_SOURCE_DIR}/src/geometry"
"${PROJECT_SOURCE_DIR}/src/graphics"
"${PROJECT_SOURCE_DIR}/src/ui_elements"
"${PROJECT_SOURCE_DIR}/src/ui_elements/widgets"
)
target_link_libraries(windows PUBLIC ${platform_LIBS} core geometry graphics ui_elements)
set_property(TARGET windows PROPERTY FOLDER src)
set_target_properties( windows PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON )