Remove vulkan build option & specify GLES for GLES specific demos 27/315327/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 22 Nov 2024 18:08:50 +0000 (18:08 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 29 Nov 2024 22:02:28 +0000 (22:02 +0000)
Change-Id: I47eaafd80aaa7508458d88fbeaf68c698d75f651

build/tizen/CMakeLists.txt
build/tizen/examples/CMakeLists.txt
examples/direct-rendering/dependencies.cmake
examples/drawable-actor/dependencies.cmake [new file with mode: 0644]

index 8c086cfad86f3c02d482f0506ce4b14378773519..8a53ec9e2825dadd86207f07d2c7e18097b519fa 100644 (file)
@@ -19,7 +19,6 @@ OPTION(ENABLE_EXPORTALL          "Enable Export all symbols" OFF)
 OPTION(ENABLE_DEBUG              "Enable Debug" OFF)
 OPTION(ENABLE_TRACE              "Enable Trace" OFF)
 OPTION(ENABLE_PKG_CONFIGURE      "Use pkgconfig" ON)
-OPTION(ENABLE_VULKAN             "Use Vulkan instead of GLES" OFF)
 OPTION(INTERNATIONALIZATION      "Internationalization demo string names" ON)
 
 SET(ROOT_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..)
@@ -412,9 +411,6 @@ ELSEIF( UNIX )
 
   IF( ANDROID )
     SET( REQUIRED_LIBS ${REQUIRED_LIBS} -lGLESv3 )
-  ELSE()
-    PKG_CHECK_MODULES( GLESV2 REQUIRED glesv2 )
-    SET( REQUIRED_LIBS ${REQUIRED_LIBS} ${GLESV2_LIBRARIES} )
   ENDIF()
 ENDIF()
 
index 0d397f161cef85fe8ebe486d78dc784d74e5cd1b..474f0fa3fe89f4410d8d552d5d53659c6b466b5a 100644 (file)
@@ -1,7 +1,6 @@
 SET(EXAMPLES_SRC_DIR ${ROOT_SRC_DIR}/examples)
 
 MESSAGE(STATUS "Building examples.")
-MESSAGE(STATUS "ENABLE_VULKAN: ${ENABLE_VULKAN}")
 MESSAGE(STATUS "ENABLE_PHYSICS_2D: ${ENABLE_PHYSICS_2D}")
 MESSAGE(STATUS "ENABLE_PHYSICS_3D: ${ENABLE_PHYSICS_3D}")
 MESSAGE(STATUS "ENABLE_SCENE3D: ${ENABLE_SCENE3D}")
@@ -35,14 +34,6 @@ IF (NOT "${ENABLE_PHYSICS_2D}" )
   ENDIF()
 ENDIF()
 
-IF(ENABLE_VULKAN)
-  # Don't build GL examples
-  SET(GLES_EXAMPLES "direct-rendering")
-  IF( ${GLES_EXAMPLES} IN_LIST SUBDIRS)
-    LIST(REMOVE_ITEM SUBDIRS ${GLES_EXAMPLES})
-  ENDIF()
-ENDIF()
-
 FIND_PROGRAM( SHADER_GENERATOR "dali-shader-generator" )
 IF( NOT SHADER_GENERATOR )
   MESSAGE( FATAL_ERROR "dali-shader-generator not found!" )
@@ -75,7 +66,7 @@ FUNCTION(INSTALL_EXAMPLES EXAMPLE)
     ADD_DEPENDENCIES(${EXAMPLE}.example ${EXAMPLE}-generate-shaders)
   ENDIF()
 
-  TARGET_LINK_LIBRARIES(${EXAMPLE}.example ${REQUIRED_LIBS})
+  TARGET_LINK_LIBRARIES(${EXAMPLE}.example ${REQUIRED_LIBS} ${EXTRA_EXAMPLE_LDFLAGS})
   INSTALL(TARGETS ${EXAMPLE}.example DESTINATION ${BINDIR})
 
 ENDFUNCTION()
index 74f98d0e1a7dfd7b21952fe6db1bcceccebd56ab..d2e8cadb66c98da2806b2df2a711cb95583d7c1a 100644 (file)
@@ -1,3 +1,6 @@
-IF(ENABLE_VULKAN)
-  SET(EXAMPLE_DISABLED=1)
+IF(ANDROID)
+  SET(EXTRA_EXAMPLE_LDFLAGS -lGLESv3)
+ELSEIF(NOT WIN32 AND NOT APPLE)
+  PKG_CHECK_MODULES(GLESV2 REQUIRED glesv2)
+  SET(EXTRA_EXAMPLE_LDFLAGS ${GLESV2_LIBRARIES})
 ENDIF()
diff --git a/examples/drawable-actor/dependencies.cmake b/examples/drawable-actor/dependencies.cmake
new file mode 100644 (file)
index 0000000..d2e8cad
--- /dev/null
@@ -0,0 +1,6 @@
+IF(ANDROID)
+  SET(EXTRA_EXAMPLE_LDFLAGS -lGLESv3)
+ELSEIF(NOT WIN32 AND NOT APPLE)
+  PKG_CHECK_MODULES(GLESV2 REQUIRED glesv2)
+  SET(EXTRA_EXAMPLE_LDFLAGS ${GLESV2_LIBRARIES})
+ENDIF()