Skip to content

Commit

Permalink
add gles include dirs to the list of include paths
Browse files Browse the repository at this point in the history
update checksum for benchmark resources zip

Test: Build
  • Loading branch information
ram-mohan authored and DichenZhang1 committed Jan 8, 2025
1 parent ea518da commit 68b866f
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,11 @@ file(GLOB UHDR_BM_SRCS_LIST "${BENCHMARK_DIR}/*.cpp")
file(GLOB IMAGE_IO_SRCS_LIST "${THIRD_PARTY_DIR}/image_io/src/**/*.cc")

set(PRIVATE_INCLUDE_DIR ${SOURCE_DIR}/include/ ${JPEG_INCLUDE_DIRS})
set(COMMON_LIBS_LIST ${JPEG_LIBRARIES} Threads::Threads)
set(PRIVATE_LINK_LIBS ${JPEG_LIBRARIES} Threads::Threads)
if(UHDR_ENABLE_GLES)
list(APPEND PRIVATE_INCLUDE_DIR ${EGL_INCLUDE_DIRS} ${OPENGLES3_INCLUDE_DIRS})
list(APPEND PRIVATE_LINK_LIBS ${EGL_LIBRARIES} ${OPENGLES3_LIBRARIES})
endif()

###########################################################
# Targets
Expand Down Expand Up @@ -612,10 +616,7 @@ target_include_directories(${UHDR_CORE_LIB_NAME} PUBLIC ${EXPORT_INCLUDE_DIR})
if(${CMAKE_SYSTEM_NAME} MATCHES "Android")
target_link_libraries(${UHDR_CORE_LIB_NAME} PUBLIC ${log-lib})
endif()
if(UHDR_ENABLE_GLES)
target_link_libraries(${UHDR_CORE_LIB_NAME} PRIVATE ${EGL_LIBRARIES} ${OPENGLES3_LIBRARIES})
endif()
target_link_libraries(${UHDR_CORE_LIB_NAME} PRIVATE ${COMMON_LIBS_LIST} ${IMAGEIO_TARGET_NAME})
target_link_libraries(${UHDR_CORE_LIB_NAME} PRIVATE ${PRIVATE_LINK_LIBS} ${IMAGEIO_TARGET_NAME})

if(UHDR_BUILD_EXAMPLES)
set(UHDR_SAMPLE_APP ultrahdr_app)
Expand Down Expand Up @@ -676,7 +677,7 @@ if(UHDR_BUILD_BENCHMARK)
target_link_libraries(ultrahdr_bm ${UHDR_CORE_LIB_NAME} ${BENCHMARK_LIBRARIES})

set(RES_FILE "${TESTS_DIR}/data/UltrahdrBenchmarkTestRes-1.2.zip")
set(RES_FILE_MD5SUM "31fc352444f95bc1ab4b9d6e397de6c1")
set(RES_FILE_MD5SUM "14eac767ef7252051cc5658c4ad776d9")
set(GET_RES_FILE TRUE)
if(EXISTS ${RES_FILE})
file(MD5 ${RES_FILE} CURR_MD5_SUM)
Expand Down Expand Up @@ -750,13 +751,10 @@ set(UHDR_TARGET_NAME uhdr)
add_library(${UHDR_TARGET_NAME})
add_dependencies(${UHDR_TARGET_NAME} ${UHDR_CORE_LIB_NAME})
target_compile_options(${UHDR_TARGET_NAME} PRIVATE ${UHDR_WERROR_FLAGS})
if(UHDR_ENABLE_GLES)
target_link_libraries(${UHDR_TARGET_NAME} PRIVATE ${EGL_LIBRARIES} ${OPENGLES3_LIBRARIES})
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Android")
target_link_libraries(${UHDR_TARGET_NAME} PRIVATE ${log-lib})
endif()
target_link_libraries(${UHDR_TARGET_NAME} PRIVATE ${JPEG_LIBRARIES})
target_link_libraries(${UHDR_TARGET_NAME} PRIVATE ${PRIVATE_LINK_LIBS})
set_target_properties(${UHDR_TARGET_NAME}
PROPERTIES PUBLIC_HEADER ultrahdr_api.h)
if(BUILD_SHARED_LIBS)
Expand All @@ -773,13 +771,10 @@ if(BUILD_SHARED_LIBS)
add_library(${UHDR_TARGET_NAME_STATIC} STATIC)
add_dependencies(${UHDR_TARGET_NAME_STATIC} ${UHDR_CORE_LIB_NAME})
target_compile_options(${UHDR_TARGET_NAME_STATIC} PRIVATE ${UHDR_WERROR_FLAGS})
if(UHDR_ENABLE_GLES)
target_link_libraries(${UHDR_TARGET_NAME_STATIC} PRIVATE ${EGL_LIBRARIES} ${OPENGLES3_LIBRARIES})
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Android")
target_link_libraries(${UHDR_TARGET_NAME_STATIC} PRIVATE ${log-lib})
endif()
target_link_libraries(${UHDR_TARGET_NAME_STATIC} PRIVATE ${JPEG_LIBRARIES})
target_link_libraries(${UHDR_TARGET_NAME_STATIC} PRIVATE ${PRIVATE_LINK_LIBS})
combine_static_libs(${UHDR_CORE_LIB_NAME} ${UHDR_TARGET_NAME_STATIC})
if(NOT MSVC)
set_target_properties(${UHDR_TARGET_NAME_STATIC}
Expand Down

0 comments on commit 68b866f

Please sign in to comment.