Skip to content

Commit

Permalink
enable add_subdirectory(waypp)
Browse files Browse the repository at this point in the history
Signed-off-by: Joel Winarske <[email protected]>
  • Loading branch information
jwinarske committed May 6, 2024
1 parent 5ee2c7d commit 3868151
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ if (NOT CMAKE_BUILD_TYPE)
message(STATUS "CMAKE_BUILD_TYPE not set, defaulting to Release.")
endif ()

list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/third_party/sanitizers-cmake/cmake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_DIR}/third_party/sanitizers-cmake/cmake)

if (NOT BUILD_NUMBER)
set(BUILD_NUMBER 0)
Expand Down
4 changes: 2 additions & 2 deletions cmake/context.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
execute_process(
COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
Expand All @@ -36,7 +36,7 @@ endif ()
#
execute_process(
COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
Expand Down
12 changes: 6 additions & 6 deletions cmake/wayland.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/protocols)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/protocols)

add_protocol(${WAYLAND_PROTOCOLS_BASE}/stable/xdg-shell/xdg-shell.xml)
add_protocol(${CMAKE_SOURCE_DIR}/third_party/agl/protocol/agl-shell.xml)
add_protocol(${CMAKE_SOURCE_DIR}/third_party/agl/protocol/agl-shell-desktop.xml)
add_protocol(${CMAKE_SOURCE_DIR}/third_party/agl/protocol/agl-screenshooter.xml)
add_protocol(${CMAKE_SOURCE_DIR}/third_party/weston/protocol/ivi-application.xml)
add_protocol(${CMAKE_SOURCE_DIR}/third_party/weston/protocol/ivi-wm.xml)
add_protocol(${CMAKE_CURRENT_SOURCE_DIR}/third_party/agl/protocol/agl-shell.xml)
add_protocol(${CMAKE_CURRENT_SOURCE_DIR}/third_party/agl/protocol/agl-shell-desktop.xml)
add_protocol(${CMAKE_CURRENT_SOURCE_DIR}/third_party/agl/protocol/agl-screenshooter.xml)
add_protocol(${CMAKE_CURRENT_SOURCE_DIR}/third_party/weston/protocol/ivi-application.xml)
add_protocol(${CMAKE_CURRENT_SOURCE_DIR}/third_party/weston/protocol/ivi-wm.xml)

add_protocol(${CMAKE_SOURCE_DIR}/third_party/weston/protocol/weston-output-capture.xml)
add_protocol(${CMAKE_CURRENT_SOURCE_DIR}/third_party/weston/protocol/weston-output-capture.xml)
message(STATUS "Weston Output Capture . ${HAS_WAYLAND_PROTOCOL_WESTON_OUTPUT_CAPTURE}")

if (ENABLE_DRM_LEASE_CLIENT)
Expand Down
2 changes: 1 addition & 1 deletion examples/gl-shadertoy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add_executable(gl-shadertoy shadertoy.cc)

target_compile_definitions(gl-shadertoy PRIVATE EGL_NO_X11 MESA_EGL_NO_X11_HEADERS)

target_include_directories(gl-shadertoy PRIVATE ${CMAKE_SOURCE_DIR}/third_party)
target_include_directories(gl-shadertoy PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/third_party)

target_link_libraries(gl-shadertoy PRIVATE waypp wayland-gen PkgConfig::GLESv2 cxxopts::cxxopts)

Expand Down
18 changes: 11 additions & 7 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#
# cxxopts
#
add_subdirectory(cxxopts-3.2.1)
if (NOT TARGET cxxopts)
add_subdirectory(cxxopts-3.2.1)
endif ()

#
# Speedlog
#
set(SPDLOG_NO_EXCEPTIONS ON)
set(SPDLOG_NO_THREAD_ID ON)
# set(SPDLOG_BUILD_PIC ON)
set(SPDLOG_SANITIZE_ADDRESS ${SANITIZE_ADDRESS})
add_library(spdlog INTERFACE)
target_include_directories(spdlog INTERFACE spdlog-1.13.0/include)
if (NOT TARGET spdlog)
set(SPDLOG_NO_EXCEPTIONS ON)
set(SPDLOG_NO_THREAD_ID ON)
# set(SPDLOG_BUILD_PIC ON)
set(SPDLOG_SANITIZE_ADDRESS ${SANITIZE_ADDRESS})
add_library(spdlog INTERFACE)
target_include_directories(spdlog INTERFACE spdlog-1.13.0/include)
endif ()

0 comments on commit 3868151

Please sign in to comment.