@ -35,25 +35,19 @@ endforeach()
include ( ExternalProject )
include ( ExternalProject )
if ( WIN32 )
if ( WIN32 )
set ( EXPAT_LIB_NAME_SUFFIX "MD" )
set ( XLSXIO_C_FLAGS "${CMAKE_C_FLAGS} /DXML_STATIC" )
set ( XLSXIO_C_FLAGS "${CMAKE_C_FLAGS} /DXML_STATIC" )
else ( )
else ( )
set ( EXPAT_LIB_NAME_SUFFIX "" )
set ( XLSXIO_C_FLAGS "${CMAKE_C_FLAGS} -DXML_STATIC" )
set ( XLSXIO_C_FLAGS "${CMAKE_C_FLAGS} -DXML_STATIC" )
endif ( )
endif ( )
set ( LIBEXPAT_INSTALL_DIR ${ CMAKE_CURRENT_BINARY_DIR } /libexpat )
# s e t t h e d e f a u l t v a l u e s o f l i b e x p a t o p t i o n s - t h e d e s c r i p t i o n s a r e l e f t e m p t y
set ( LIBEXPAT_LIB ${ LIBEXPAT_INSTALL_DIR } /lib/libexpat ${ EXPAT_LIB_NAME_SUFFIX } ${ CMAKE_STATIC_LIBRARY_SUFFIX } )
# b e c a u s e l a t e r option ( ) c a l l s * d o * o v e r r i d e t h o s e
set ( LIBEXPAT_LIB ${ LIBEXPAT_LIB } PARENT_SCOPE )
set ( EXPAT_BUILD_EXAMPLES OFF CACHE BOOL "" )
ExternalProject_Add ( libexpat_project
set ( EXPAT_BUILD_TESTS OFF CACHE BOOL "" )
P R E F I X l i b e x p a t
set ( EXPAT_BUILD_TOOLS OFF CACHE BOOL "" )
S O U R C E _ D I R $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / l i b e x p a t / e x p a t
set ( EXPAT_SHARED_LIBS OFF CACHE BOOL "" )
I N S T A L L _ D I R $ { L I B E X P A T _ I N S T A L L _ D I R }
set ( EXPAT_BUILD_DOCS OFF CACHE BOOL "" )
B U I L D _ B Y P R O D U C T S $ { L I B E X P A T _ L I B }
add_subdirectory ( libexpat/expat )
C M A K E _ G E N E R A T O R " $ { C M A K E _ G E N E R A T O R } "
C M A K E _ G E N E R A T O R _ T O O L S E T " $ { C M A K E _ G E N E R A T O R _ T O O L S E T } "
C M A K E _ A R G S $ { C L _ A R G S } - D C M A K E _ I N S T A L L _ P R E F I X = $ { L I B E X P A T _ I N S T A L L _ D I R } - D C M A K E _ B U I L D _ T Y P E = R e l e a s e - D E X P A T _ B U I L D _ E X A M P L E S = O F F - D E X P A T _ B U I L D _ T E S T S = O F F - D E X P A T _ B U I L D _ T O O L S = O F F - D E X P A T _ S H A R E D _ L I B S = O F F - D C M A K E _ I N S T A L L _ L I B D I R = l i b - D C M A K E _ P O S I T I O N _ I N D E P E N D E N T _ C O D E = O N
)
set ( LIBZIP_INSTALL_DIR ${ CMAKE_CURRENT_BINARY_DIR } /libzip )
set ( LIBZIP_INSTALL_DIR ${ CMAKE_CURRENT_BINARY_DIR } /libzip )
set ( LIBZIP_LIB ${ LIBZIP_INSTALL_DIR } /lib/ ${ CMAKE_STATIC_LIBRARY_PREFIX } zip ${ CMAKE_STATIC_LIBRARY_SUFFIX } )
set ( LIBZIP_LIB ${ LIBZIP_INSTALL_DIR } /lib/ ${ CMAKE_STATIC_LIBRARY_PREFIX } zip ${ CMAKE_STATIC_LIBRARY_SUFFIX } )
@ -74,11 +68,11 @@ set(XLSXIO_LIB ${XLSXIO_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}xlsxio_re
set ( XLSXIO_LIB ${ XLSXIO_LIB } PARENT_SCOPE )
set ( XLSXIO_LIB ${ XLSXIO_LIB } PARENT_SCOPE )
ExternalProject_Add ( xlsxio_project
ExternalProject_Add ( xlsxio_project
P R E F I X x l s x i o
P R E F I X x l s x i o
D E P E N D S l i b ex p a t _ p r o j e c t l i b zi p _ p r o j e c t
D E P E N D S l i b zi p _ p r o j e c t
S O U R C E _ D I R $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / x l s x i o
S O U R C E _ D I R $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / x l s x i o
I N S T A L L _ D I R $ { X L S X I O _ I N S T A L L _ D I R }
I N S T A L L _ D I R $ { X L S X I O _ I N S T A L L _ D I R }
B U I L D _ B Y P R O D U C T S $ { X L S X I O _ L I B }
B U I L D _ B Y P R O D U C T S $ { X L S X I O _ L I B }
C M A K E _ G E N E R A T O R " $ { C M A K E _ G E N E R A T O R } "
C M A K E _ G E N E R A T O R " $ { C M A K E _ G E N E R A T O R } "
C M A K E _ G E N E R A T O R _ T O O L S E T " $ { C M A K E _ G E N E R A T O R _ T O O L S E T } "
C M A K E _ G E N E R A T O R _ T O O L S E T " $ { C M A K E _ G E N E R A T O R _ T O O L S E T } "
C M A K E _ A R G S $ { C L _ A R G S } - D C M A K E _ I N S T A L L _ P R E F I X = $ { X L S X I O _ I N S T A L L _ D I R } - D C M A K E _ B U I L D _ T Y P E = R e l e a s e - D B U I L D _ S T A T I C = O N - D B U I L D _ S H A R E D = O F F - D C M A K E _ P O S I T I O N _ I N D E P E N D E N T _ C O D E = O N - D B U I L D _ T O O L S = O F F - D B U I L D _ E X A M P L E S = O F F - D B U I L D _ D O C U M E N T A T I O N = O F F - D W I T H _ L I B Z I P = O N - D Z L I B _ D I R = $ { Z L I B _ D I R } - D L I B Z I P _ D I R = $ { L I B Z I P _ I N S T A L L _ D I R } - D EX P A T _ D I R = $ { L I B E X P A T _ I N S T A L L _ D I R } - D E X P A T _ L I B R A R I E S = $ { L I B E X P A T _ L I B } - D E X P A T _ I N C L U D E _ D I R S = $ { L I B E X P A T _ I N S T A L L _ D I R } / i n c l u d e - D CM A K E _ P O S I T I O N _ I N D E P E N D E N T _ C O D E = O N - D C M A K E _ C _ F L A G S = $ { X L S X I O _ C _ F L A G S }
C M A K E _ A R G S $ { C L _ A R G S } - D C M A K E _ I N S T A L L _ P R E F I X = $ { X L S X I O _ I N S T A L L _ D I R } - D C M A K E _ B U I L D _ T Y P E = R e l e a s e - D B U I L D _ S T A T I C = O N - D B U I L D _ S H A R E D = O F F - D C M A K E _ P O S I T I O N _ I N D E P E N D E N T _ C O D E = O N - D B U I L D _ T O O L S = O F F - D B U I L D _ E X A M P L E S = O F F - D B U I L D _ D O C U M E N T A T I O N = O F F - D W I T H _ L I B Z I P = O N - D Z L I B _ D I R = $ { Z L I B _ D I R } - D L I B Z I P _ D I R = $ { L I B Z I P _ I N S T A L L _ D I R } - D CM A K E _ P O S I T I O N _ I N D E P E N D E N T _ C O D E = O N - D C M A K E _ C _ F L A G S = $ { X L S X I O _ C _ F L A G S }
)
)