Skip to content

Commit 9f9eaf5

Browse files
Copilotithewei
andcommitted
Fix config.mk self-referential comment and Windows MSVC static lib naming conflict
1. Remove self-referential comment from config.mk (comment was for config.ini) 2. Guard OUTPUT_NAME hv on static target to avoid .lib conflict on Windows when both BUILD_SHARED and BUILD_STATIC are enabled Co-authored-by: ithewei <26049660+ithewei@users.noreply.github.com>
1 parent ce692fe commit 9f9eaf5

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ if(BUILD_STATIC)
267267
target_include_directories(hv_static PRIVATE ${LIBHV_SRCDIRS}
268268
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
269269
target_link_libraries(hv_static ${LIBS})
270-
set_target_properties(hv_static PROPERTIES OUTPUT_NAME hv)
270+
if(NOT (WIN32 AND BUILD_SHARED))
271+
set_target_properties(hv_static PROPERTIES OUTPUT_NAME hv)
272+
endif()
271273
install(TARGETS hv_static
272274
EXPORT libhvConfig
273275
ARCHIVE DESTINATION lib)

config.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Don't modify this file, you should modify config.mk or
2-
# run ./configure --with-MODULE --enable-FEATURE
3-
41
PREFIX=/usr/local
52
INSTALL_INCDIR=$(PREFIX)/include/hv
63
INSTALL_LIBDIR=$(PREFIX)/lib

0 commit comments

Comments
 (0)