diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c93f2740..a5d6f1f31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,22 +33,6 @@ include( CTest ) #set( CMAKE_C_VISIBILITY_PRESET hidden ) #set( CMAKE_CXX_VISIBILITY_PRESET hidden ) -mark_as_advanced( BUILD_SHARED_LIBS ) -option( BUILD_SHARED_LIBS "Build shared libraries?" OFF ) -if( BUILD_SHARED_LIBS ) - add_definitions( -D_ELASTIX_USE_SHARED_LIBRARY ) - - # We need to make sure that also the ITK is compiled with shared - # libraries on. Related to flag (ITK_)BUILD_SHARED_LIBS. todo - - # In order to compile a shared library, all static sub-libraries - # need to build position independend code. - # Otherwise an error similar to the following is raised: - # relocation R_X86_64_32S against `.bss' can not be used when - # making a shared object; recompile with -fPIC - set( CMAKE_POSITION_INDEPENDENT_CODE ON ) -endif() - #--------------------------------------------------------------------- # Find ITK. find_package( ITK 5.1.1 REQUIRED )