Skip to content

Commit 16e24e3

Browse files
authored
Update
1 parent b666d3d commit 16e24e3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmake/CppInterOp/CppInterOpConfig.cmake.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ get_filename_component(CPPINTEROP_INSTALL_PREFIX "${CPPINTEROP_INSTALL_PREFIX}"
1010
include(CMakeSystemSpecificInformation)
1111

1212
### build/install workaround
13-
if (@BUILD_SHARED_LIBS@ STREQUAL "ON")
13+
if (@BUILD_SHARED_LIBS@)
1414
set(__lib_suffix ${CMAKE_SHARED_LIBRARY_SUFFIX})
1515
set(__lib_prefix ${CMAKE_SHARED_LIBRARY_PREFIX})
1616
else()
@@ -34,7 +34,11 @@ set(CPPINTEROP_INCLUDE_DIRS "${_include}")
3434
set(CPPINTEROP_LIBRARIES "${_libs}")
3535

3636
# Provide all our library targets to users.
37-
add_library(clangCppInterOp SHARED IMPORTED)
37+
if (@BUILD_SHARED_LIBS@)
38+
add_library(clangCppInterOp SHARED IMPORTED)
39+
else()
40+
add_library(clangCppInterOp STATIC IMPORTED)
41+
endif()
3842
set_property(TARGET clangCppInterOp PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${_include}")
3943
set_property(TARGET clangCppInterOp PROPERTY IMPORTED_LOCATION "${_libs}")
4044

0 commit comments

Comments
 (0)