[Insight-developers] ITK Modularization transition pushed

Williams, Norman K norman-k-williams at uiowa.edu
Thu Mar 10 13:33:21 EST 2011


The following patch will get things configuring OK, and it looks like other libraries do something similar.

diff --git a/ITK/Utilities/NIFTI/src/nifti/niftilib/CMakeLists.txt b/ITK/Utilities/NIFTI/src/nifti/niftilib/CMakeLists.txt
index 54b3ead..fd8754e 100644
--- a/ITK/Utilities/NIFTI/src/nifti/niftilib/CMakeLists.txt
+++ b/ITK/Utilities/NIFTI/src/nifti/niftilib/CMakeLists.txt
@@ -10,7 +10,9 @@ target_link_libraries( ${NIFTI_NIFTILIB_NAME} ${PACKAGE_PREFIX}znz)

 # Set library version when building shared libs.
 if(BUILD_SHARED_LIBS)
-  set_target_properties(${NIFTI_NIFTILIB_NAME} PROPERTIES ${NIFTI_LIBRARY_PROPERTIES})
+  if(ITK_LIBRARY_PROPERTIES)
+    set_target_properties(${NIFTI_NIFTILIB_NAME} PROPERTIES ${NIFTI_LIBRARY_PROPERTIES})
+  endif(ITK_LIBRARY_PROPERTIES)
 endif(BUILD_SHARED_LIBS)

 if(UNIX)
diff --git a/ITK/Utilities/NIFTI/src/nifti/znzlib/CMakeLists.txt b/ITK/Utilities/NIFTI/src/nifti/znzlib/CMakeLists.txt
index 1ea48b5..d9f754e 100644
--- a/ITK/Utilities/NIFTI/src/nifti/znzlib/CMakeLists.txt
+++ b/ITK/Utilities/NIFTI/src/nifti/znzlib/CMakeLists.txt
@@ -10,7 +10,9 @@ target_link_libraries( ${NIFTI_ZNZLIB_NAME} ${NIFTI_ZLIB_LIBRARIES} )

 # Set library version if building shared libs.
 if(BUILD_SHARED_LIBS)
-  set_target_properties(${NIFTI_ZNZLIB_NAME} PROPERTIES ${NIFTI_LIBRARY_PROPERTIES})
+  if(${NIFTI_LIBRARY_PROPERTIES})
+    set_target_properties(${NIFTI_ZNZLIB_NAME} PROPERTIES ${NIFTI_LIBRARY_PROPERTIES})
+  endif(${NIFTI_LIBRARY_PROPERTIES})
 endif(BUILD_SHARED_LIBS)

--
Kent Williams norman-k-williams at uiowa.edu


From: Xiaoxiao Liu <xiaoxiao.liu at kitware.com<mailto:xiaoxiao.liu at kitware.com>>
Date: Thu, 10 Mar 2011 12:08:27 -0500
To: Mushly McMushmaster <norman-k-williams at uiowa.edu<mailto:norman-k-williams at uiowa.edu>>
Cc: ITK <insight-developers at itk.org<mailto:insight-developers at itk.org>>
Subject: Re: [Insight-developers] ITK Modularization transition pushed

Hi Williams,
We haven't tested with "BUILD_SHARED_LIBS" ON yet.
It's in our TODO list.
Thanks for the timely report.


On Thu, Mar 10, 2011 at 12:01 PM, Williams, Norman K <norman-k-williams at uiowa.edu<mailto:norman-k-williams at uiowa.edu>> wrote:
1. Used git pullall to get a clean tree.
2. Configured (in an empty build directory) thusly:

cmake -DITK_BUILD_ALL_MODULES:BOOL=On \
-DCMAKE_C_FLAGS:STRING="-Wall -Wextra" \
-DCMAKE_CXX_FLAGS:STRING="-Wall -Wextra" \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DBUILD_SHARED_LIBS:BOOL=On ../ITK

I get these errors:

CMake Error at ITK/Utilities/NIFTI/src/nifti/znzlib/CMakeLists.txt:13
(set_target_properties):
 set_target_properties called with illegal arguments, maybe missing a
 PROPERTIES specifier?


CMake Error at ITK/Utilities/NIFTI/src/nifti/niftilib/CMakeLists.txt:13
(set_target_properties):
 set_target_properties called with illegal arguments, maybe missing a
 PROPERTIES specifier?

If I change to -DBUILD_SHARED_LIBS:BOOL=Off it works fine.



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________
_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers



--
---------------------------------------------
Xiaoxiao Liu, Ph.D.
R & D Engineer
Kitware Inc<http://www.kitware.com/>.
Clifton Park, NY
Phone: (518) 881-4924  or  (518) 371-3971 x124




________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110310/acfb284b/attachment.htm>


More information about the Insight-developers mailing list