Skip to content

Commit

Permalink
support for building lib pxWayland
Browse files Browse the repository at this point in the history
  • Loading branch information
mfiess committed May 22, 2017
1 parent e935ea1 commit ee8e3c2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions examples/pxScene2d/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ set(BREAKPADINC ${EXTDIR}/breakpad/src)
set(RTREMOTEINC ${PXCOREDIR}/remote)

set(PX_LIBRARY_SUPPORT 1)
set(PXWAYLAND_LIBRARY_SUPPORT 0)

option(BUILD_WITH_GL "BUILD_WITH_GL" ON)
option(BUILD_WITH_WAYLAND "BUILD_WITH_WAYLAND" OFF)
Expand Down Expand Up @@ -92,6 +93,7 @@ elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
separate_arguments(PXCORE_STAGING_LIST)
include_directories(AFTER ${PXCORE_STAGING_LIST})
add_definitions(-DPX_NO_WINDOW -DENABLE_V8_HEAP_PARAMS -DENABLE_MAX_TEXTURE_SIZE -DBSTD_CPU_ENDIAN=BSTD_ENDIAN_LITTLE)
set(PXWAYLAND_LIBRARY_SUPPORT 1)
elseif (BUILD_WITH_WINDOWLESS_DFB)
message("building pxscene for windowless DFB")
set(PX_PLATFORM PX_PLATFORM_GENERIC_DFB)
Expand Down Expand Up @@ -149,6 +151,8 @@ include_directories(AFTER ${CMAKE_SOURCE_DIR})
set(PXSCENE_COMMON_FILES pxScene2d.cpp pxResource.cpp pxConstants.cpp pxRectangle.cpp pxFont.cpp pxText.cpp
pxTextBox.cpp pxImage.cpp pxImage9.cpp pxImageA.cpp pxArchive.cpp pxAnimate.cpp)

set(PXWAYLAND_LIB_FILES pxContextGL.cpp egl/pxContextUtils.cpp)

if (BUILD_WITH_GL)
message("Building with GL support")
set(PXSCENE_COMMON_FILES ${PXSCENE_COMMON_FILES} pxContextGL.cpp)
Expand All @@ -161,6 +165,7 @@ if (BUILD_WITH_WAYLAND)
message("Building with wayland support")
set(PXSCENE_COMMON_FILES ${PXSCENE_COMMON_FILES} pxWayland.cpp pxWaylandContainer.cpp)
add_definitions(-DENABLE_PX_WAYLAND_RPC)
set(PXWAYLAND_LIB_FILES ${PXWAYLAND_LIB_FILES} pxWayland.cpp)
else()
message("Not building with wayland support")
add_definitions(-DDISABLE_WAYLAND)
Expand Down Expand Up @@ -212,6 +217,15 @@ if (PX_LIBRARY_SUPPORT GREATER 0)
add_library(pxscene_shared SHARED ${PXSCENE_LIB_FILES})
set_target_properties(pxscene_shared PROPERTIES OUTPUT_NAME "pxscene")
target_link_libraries(pxscene_shared ${LIBRARY_LINKER_OPTIONS} ${PXSCENE_LINK_LIBRARIES})
if (PXWAYLAND_LIBRARY_SUPPORT GREATER 0)
message("Enabling build support for pxWayland libraries")
add_library(pxwayland_static ${PXWAYLAND_LIB_FILES})
set_target_properties(pxwayland_static PROPERTIES OUTPUT_NAME "pxwayland_s")

add_library(pxwayland_shared SHARED ${PXWAYLAND_LIB_FILES})
set_target_properties(pxwayland_shared PROPERTIES OUTPUT_NAME "pxwayland")
target_link_libraries(pxwayland_shared ${LIBRARY_LINKER_OPTIONS} ${PXSCENE_LINK_LIBRARIES})
endif(PXWAYLAND_LIBRARY_SUPPORT GREATER 0)
else()
message("Disabling build support for libraries")
endif(PX_LIBRARY_SUPPORT GREATER 0)
Expand Down

0 comments on commit ee8e3c2

Please sign in to comment.