mirror of
https://github.com/lvgl/lvgl.git
synced 2026-06-01 16:58:33 +08:00
fix(test): fix compile error on macos (#6377)
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
+13
-5
@@ -337,15 +337,24 @@ if ($ENV{NON_AMD64_BUILD})
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# OpenGL ES is required for its driver
|
# OpenGL ES is required for its driver
|
||||||
if (NOT $ENV{NON_AMD64_BUILD})
|
if ($ENV{NON_AMD64_BUILD})
|
||||||
find_package(OpenGL REQUIRED)
|
message("Disable OpenGL, GLEW or glfw3 for non-amd64 build")
|
||||||
find_package(GLEW REQUIRED)
|
add_definitions(-DLV_USE_OPENGLES=0)
|
||||||
find_package(glfw3 REQUIRED)
|
else()
|
||||||
|
find_package(OpenGL)
|
||||||
|
find_package(GLEW)
|
||||||
|
find_package(glfw3)
|
||||||
|
|
||||||
|
if(OpenGL_FOUND AND GLEW_FOUND AND glfw3_FOUND)
|
||||||
# Include directories
|
# Include directories
|
||||||
include_directories(${OPENGL_INCLUDE_DIR})
|
include_directories(${OPENGL_INCLUDE_DIR})
|
||||||
include_directories(${GLEW_INCLUDE_DIRS})
|
include_directories(${GLEW_INCLUDE_DIRS})
|
||||||
include_directories(${GLFW_INCLUDE_DIRS})
|
include_directories(${GLFW_INCLUDE_DIRS})
|
||||||
|
message("Enable LV_USE_OPENGLES")
|
||||||
|
else()
|
||||||
|
message("OpenGL, GLEW or glfw3 not found, defaulting to 0")
|
||||||
|
add_definitions(-DLV_USE_OPENGLES=0)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT LIBINPUT_FOUND)
|
if (NOT LIBINPUT_FOUND)
|
||||||
@@ -441,7 +450,6 @@ foreach( test_case_fname ${TEST_CASE_FILES} )
|
|||||||
${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} glfw)
|
${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} glfw)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
target_include_directories(${test_name} PUBLIC ${TEST_INCLUDE_DIRS})
|
target_include_directories(${test_name} PUBLIC ${TEST_INCLUDE_DIRS})
|
||||||
target_compile_options(${test_name} PUBLIC ${LVGL_TESTFILE_COMPILE_OPTIONS})
|
target_compile_options(${test_name} PUBLIC ${LVGL_TESTFILE_COMPILE_OPTIONS})
|
||||||
|
|
||||||
|
|||||||
@@ -135,9 +135,11 @@
|
|||||||
#define LV_LIBINPUT_XKB 1
|
#define LV_LIBINPUT_XKB 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef LV_USE_OPENGLES
|
||||||
#if !defined(NON_AMD64_BUILD) && !defined(_MSC_VER) && !defined(_WIN32)
|
#if !defined(NON_AMD64_BUILD) && !defined(_MSC_VER) && !defined(_WIN32)
|
||||||
#define LV_USE_OPENGLES 1
|
#define LV_USE_OPENGLES 1
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define LV_USE_FREETYPE 1
|
#define LV_USE_FREETYPE 1
|
||||||
#define LV_FREETYPE_USE_LVGL_PORT 0
|
#define LV_FREETYPE_USE_LVGL_PORT 0
|
||||||
|
|||||||
Reference in New Issue
Block a user