Skip to content

Commit

Permalink
Allow static build of the Python Module
Browse files Browse the repository at this point in the history
Contributes to CURA-8640
  • Loading branch information
[email protected] authored and jellespijker committed Apr 14, 2022
1 parent 55ac188 commit 6636816
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmake/SIPMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ function(add_sip_module MODULE_TARGET)
# create the target library and link all the files (generated and user specified
message(STATUS "SIP: Linking the interface target against the shared library")
set(sip_sources "${sip_c}" "${sip_cpp}" "${usr_src}")
add_library("sip_${MODULE_TARGET}" SHARED ${sip_sources})

if (BUILD_SHARED_LIBS)
add_library("sip_${MODULE_TARGET}" SHARED ${sip_sources})
else()
add_library("sip_${MODULE_TARGET}" STATIC ${sip_sources})
endif()

# Make sure that the library name of the target is the same as the MODULE_TARGET with the appropriate extension
target_link_libraries("sip_${MODULE_TARGET}" PRIVATE "${MODULE_TARGET}")
Expand Down

0 comments on commit 6636816

Please sign in to comment.