2 # Convenient library are not portable (at least does not work on Win32).
3 # Therefore instead of doing a SUBDIRS, let's do an INCLUDE of the subdirs
4 # and build the global library here...
5 SUBDIRS(include/jasper) # This is one can stay here
7 MACRO(GDCM_CONVENIENT_LIBRARY)
8 #MESSAGE("ARGC=${ARGC}")
9 #MESSAGE("ARGV=${ARGV}")
10 SET(GDCMJASPER_SOURCES)
11 FOREACH(SUBDIR ${ARGV})
12 INCLUDE("${GDCMJASPER_SOURCE_DIR}/src/libjasper/${SUBDIR}/CMakeLists.txt")
13 #MESSAGE("FILES=${lib${SUBDIR}_la_SOURCES}")
14 #SET(convenient_lib${SUBDIR}_la_SOURCES)
15 FOREACH(file ${lib${SUBDIR}_la_SOURCES})
16 #MESSAGE("${SUBDIR}/${file}")
17 #MESSAGE("BAR ${convenient_lib${SUBDIR}_la_SOURCES}")
18 #MESSAGE("${GDCMJASPER_SOURCE_DIR}/src/libjasper/${SUBDIR}/${file}")
19 #SET(convenient_lib${SUBDIR}_la_SOURCES
20 # "${GDCMJASPER_SOURCE_DIR}/src/libjasper/${SUBDIR}/${file}"
21 # "${convenient_lib${SUBDIR}_la_SOURCES}"
23 SET(GDCMJASPER_SOURCES
24 ${GDCMJASPER_SOURCE_DIR}/src/libjasper/${SUBDIR}/${file}
28 #MESSAGE("R= ${convenient_lib${SUBDIR}_la_SOURCES}")
30 ENDMACRO(GDCM_CONVENIENT_LIBRARY)
32 GDCM_CONVENIENT_LIBRARY(base bmp jp2 jpc jpg mif pgx pnm ras)
34 #MESSAGE("src= ${GDCMJASPER_SOURCES}")
35 ADD_LIBRARY(gdcmjasper ${GDCMJASPER_SOURCES})