aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/shared_libs.cmake
blob: 2c9de143cc5a364485d1abb24e077015d1a6ce5f (plain) (blame)
1
2
3
4
5
6
7
8
9
add_custom_target(all-shared-libs)

function(add_shared_library Tgt)
  add_library(${Tgt} SHARED ${ARGN})
  add_dependencies(all-shared-libs ${Tgt})
  if (NOT CMAKE_POSITION_INDEPENDENT_CODE)
    set_property(TARGET ${Tgt} PROPERTY EXCLUDE_FROM_ALL On)
  endif()
endfunction()