Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ cmake_minimum_required( VERSION 2.8 )
project( elastix )
set(CMAKE_CXX_STANDARD 11)

if( BUILD_SHARED_LIBS )
message(FATAL_ERROR "Elastix does not support BUILD_SHARED_LIBS")
endif()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"elastix does not support BUILD_SHARED_LIBS"

of

"elastix does not support BUILD_SHARED_LIBS ON"

The "no longer" can go, as we never suported it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

except for the exact wording, this looks good to me. So go ahead with a merge

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mstaring Are you sure elastix never supported BUILD_SHARED_LIBS? In elastix-4.9.0-manual.pdf it says:

If elastix is supplied as a shared library (DLL), you need to define the preprocessor symbol _ELASTIX_USE_SHARED_LIBRARY

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quite sure that it never worked. Can you also modify this sentence in the manual?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mstaring I just adjusted manual.tex and elxMacro.h accordingly. Please check again!


#---------------------------------------------------------------------
cmake_policy( SET CMP0012 NEW )
if( POLICY CMP0033 )
Expand Down
14 changes: 2 additions & 12 deletions Core/Install/elxMacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,19 +291,9 @@ public: \
* Dll export *
* *
********************************************************************************/
// Note: Consumers of the DLL must define the symbol _ELASTIX_USE_SHARED_LIBRARY.
// No such symbol is required for users of the static library.
//

#if ( defined( _WIN32 ) || defined( WIN32 ) )
# ifdef _ELASTIX_USE_SHARED_LIBRARY
# ifdef elastix_EXPORTS
# define ELASTIXLIB_API __declspec( dllexport )
# else
# define ELASTIXLIB_API __declspec( dllimport )
# endif
# else
# define ELASTIXLIB_API
# endif
# define ELASTIXLIB_API
#else
# if ( __GNUC__ >= 4 || defined( __clang__ ) )
# define ELASTIXLIB_API __attribute__ ( ( visibility( "default" ) ) )
Expand Down
10 changes: 3 additions & 7 deletions dox/manual/manual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2832,9 +2832,9 @@ \subsubsection{Building \elastix\ as a static or dynamic library}
To build \elastix\ as a library you have to disable the
\texttt{ELASTIX\_BUILD\_EXECUTABLE} option in CMake. With this
option disabled a build project for a static library will be
created. If you want to create a dynamic library (not very well
tested), you have to enable the \texttt{BUILD\_SHARED\_LIBS}
option.
created. Note that \elastix\ cannot be built as a dynamic library:
The CMake option \texttt{BUILD\_SHARED\_LIBS} should be \texttt{OFF},
when building \elastix\.

\subsubsection{Linking with the \elastix\ library}

Expand Down Expand Up @@ -2863,10 +2863,6 @@ \subsubsection{Linking with the \elastix\ library}
If you want to control better to which binaries you link \elastix,
use the CMake \texttt{target\_link\_libraries} directive instead.

If \elastix\ is supplied as a shared library (DLL), you need to define
the preprocessor symbol \texttt{\_ELASTIX\_USE\_SHARED\_LIBRARY}.
No such symbol is required when linking against a static
\elastix\ library.

\subsubsection{Preparing registration parameter settings}

Expand Down