Skip to content

Commit

Permalink
Fix clang linker problem by defining POCO_NO_AUTOMATIC_LIBS
Browse files Browse the repository at this point in the history
  • Loading branch information
linquize committed Jan 3, 2021
1 parent 7380087 commit 7106959
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CppUnit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ target_include_directories(CppUnit
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_definitions(CppUnit PUBLIC POCO_NO_AUTOMATIC_LIBS)
endif()

if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(CppUnit
Expand Down
3 changes: 3 additions & 0 deletions Foundation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ endif()

if(WIN32)
target_compile_definitions(Foundation PUBLIC POCO_OS_FAMILY_WINDOWS UNICODE _UNICODE)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_definitions(Foundation PUBLIC POCO_NO_AUTOMATIC_LIBS)
endif()
target_link_libraries(Foundation PUBLIC iphlpapi)
endif()

Expand Down

0 comments on commit 7106959

Please sign in to comment.