Skip to content

Commit

Permalink
update static library name in MSVC builds
Browse files Browse the repository at this point in the history
In MSVC builds, static library and import shared lib are sharing a
common name. This is corrected.

Update documentation.

Test: Build
  • Loading branch information
ram-mohan committed Sep 6, 2024
1 parent cc8cfd2 commit bdcb95c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,11 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
if(${CMAKE_SYSTEM_NAME} MATCHES "Android")
if (UHDR_ENABLE_LOGS)
find_library(log-lib log QUIET)
message("here is what i found ${log-lib}")
if(NOT log-lib)
message(FATAL_ERROR "Could NOT find log library, retry after installing \
log library at sysroot or try 'cmake -DUHDR_ENABLE_LOGS=0'")
else()
message(STATUS "Found log-lib: ${log-lib}")
endif()
endif()
endif()
Expand Down Expand Up @@ -677,8 +678,10 @@ if(BUILD_SHARED_LIBS)
endif()
target_link_libraries(${UHDR_TARGET_NAME_STATIC} PRIVATE ${JPEG_LIBRARIES})
combine_static_libs(${UHDR_CORE_LIB_NAME} ${UHDR_TARGET_NAME_STATIC})
set_target_properties(${UHDR_TARGET_NAME_STATIC}
PROPERTIES OUTPUT_NAME ${UHDR_TARGET_NAME})
if(NOT MSVC)
set_target_properties(${UHDR_TARGET_NAME_STATIC}
PROPERTIES OUTPUT_NAME ${UHDR_TARGET_NAME})
endif()
endif()

if(UHDR_BUILD_JAVA)
Expand Down
6 changes: 6 additions & 0 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ This will generate the following files under `build_directory`:

**libuhdr.so.{version}** - Shared library for the libuhdr API <br>
**libuhdr.so** - Symlink to shared library <br>
**libuhdr.a** - Static link library for the libuhdr API <br>
**libuhdr.pc** - libuhdr pkg-config file <br>
**ultrahdr_app** - sample application <br>
**ultrahdr_unit_test** - unit tests <br>
Expand Down Expand Up @@ -138,6 +139,7 @@ This will generate the following files under `build_directory`:

**libuhdr.{version}.dylib** - Shared library for the libuhdr API <br>
**libuhdr.dylib** - Symlink to shared library <br>
**libuhdr.a** - Static link library for the libuhdr API <br>
**libuhdr.pc** - libuhdr pkg-config file <br>
**ultrahdr_app** - sample application <br>
**ultrahdr_unit_test** - unit tests <br>
Expand Down Expand Up @@ -176,6 +178,7 @@ This will generate the following files under `build_directory`:

**libuhdr.dll** - Shared library for the libuhdr API <br>
**libuhdr.dll.a** - Import library for the libuhdr API <br>
**libuhdr.a** - Static link library for the libuhdr API <br>
**libuhdr.pc** - libuhdr pkg-config file <br>
**ultrahdr_app** - sample application <br>
**ultrahdr_unit_test** - unit tests <br>
Expand Down Expand Up @@ -206,6 +209,7 @@ This will generate the following files under `build_directory`:

**uhdr.dll** - Shared library for the libuhdr API <br>
**uhdr.lib** - Import library for the libuhdr API <br>
**uhdr-static.lib** - Static link library for the libuhdr API <br>
**ultrahdr_app** - sample application <br>
**ultrahdr_unit_test** - unit tests <br>

Expand Down Expand Up @@ -244,6 +248,7 @@ This will generate the following files under `build_directory`:

**libuhdr.so.{version}** - Shared library for the libuhdr API <br>
**libuhdr.so** - Symlink to shared library <br>
**libuhdr.a** - Static link library for the libuhdr API <br>
**ultrahdr_app** - sample application <br>
**ultrahdr_unit_test** - unit tests <br>

Expand All @@ -267,6 +272,7 @@ ninja
This will generate the following files under `build_directory`:

**libuhdr.so** - Shared library for the libuhdr API <br>
**libuhdr.a** - Static link library for the libuhdr API <br>
**ultrahdr_app** - sample application <br>
**ultrahdr_unit_test** - unit tests <br>

Expand Down

0 comments on commit bdcb95c

Please sign in to comment.