Changeset 9f8b866 in tol
- Timestamp:
- Nov 26, 2015, 10:52:06 AM (11 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 050d393
- Parents:
- 6b02367
- File:
-
- 1 edited
-
tol/CMakeLists.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/CMakeLists.txt
r6b02367 r9f8b866 79 79 string( REPLACE "\n" "\\\n" LAST_CHANGED_LOG ${Project_LAST_CHANGED_LOG} ) 80 80 message( "LAST_CHANGED_LOG = \n ${LAST_CHANGED_LOG}" ) 81 82 function( get_tol_plat var ) 83 if( CMAKE_SIZEOF_VOID_P EQUAL 4 ) 84 set( tol_ps 32 ) 85 elseif( CMAKE_SIZEOF_VOID_P EQUAL 8 ) 86 set( tol_ps 64 ) 87 else( ) 88 message( WARNING "Could not determine pointer size because CMAKE_SIZEOF_VOID_P=${CMAKE_SIZEOF_VOID_P}" ) 89 set( ${var} "unknown" PARENT_SCOPE ) 90 return() 91 endif( ) 92 string( TOUPPER ${CMAKE_SYSTEM_NAME} _system ) 93 if( UNIX ) 94 if( _system STREQUAL "LINUX" ) 95 set( ${var} "Linux${tol_ps}GNU" PARENT_SCOPE ) 96 return() 97 else( ) 98 message( WARNING "Could not determine TOL platform for system ${CMAKE_SYSTEM_NAME}" ) 99 set( ${var} "unknown" PARENT_SCOPE ) 100 return() 101 endif( ) 102 elseif( MINGW ) 103 set( ${var} "Win${tol_ps}GNU" ) 104 else( MINGW ) 105 message( WARNING "Could not determine TOL platform for system ${CMAKE_SYSTEM_NAME}" ) 106 set( ${var} "unknown" PARENT_SCOPE ) 107 return() 108 endif( UNIX ) 109 endfunction( get_tol_plat ) 110 111 function( download_tol_package pkg bin ) 112 set( url "http://packages.tol-project.org/OfficialTolArchiveNetwork/repository.php?action=download&format=attachment&tol_package_version=4&package=${pkg}" ) 113 if ( WGET_FOUND ) 114 if( bin ) 115 get_tol_plat( tol_plat ) 116 set( url "${url}%23${tol_plat}" ) 117 endif( ) 118 message( "going to download last version of ${pkg} ..." ) 119 execute_process( 120 COMMAND ${WGET_EXECUTABLE} --content-disposition "${url}" 121 OUTPUT_VARIABLE WGET_OUTPUT 122 ERROR_VARIABLE IGNORE_ERROR 123 OUTPUT_STRIP_TRAILING_WHITESPACE ) 124 else( WGET_FOUND ) 125 message( WARNING "Could not download package ${pkg} because wget command is not available" ) 126 endif( WGET_FOUND ) 127 endfunction( download_tol_package ) 81 128 82 129 set( TOL_SUBLIBRARIES "" CACHE INTERNAL "" ) … … 374 421 add_subdirectory( bin ) 375 422 endif( UNIX ) 423 424 find_package( Wget ) 425 if ( WGET_FOUND ) 426 download_tol_package( StdLib 0 ) 427 download_tol_package( TclCore 1 ) 428 message( "${CMAKE_CURRENT_BINARY_DIR}/*.zip.1" ) 429 file( GLOB zip_copies "${CMAKE_CURRENT_BINARY_DIR}/*.zip.1" ) 430 message( STATUS "zip_copies = ${zip_copies}" ) 431 foreach( f ${zip_copies} ) 432 string( REPLACE ".zip.1" ".zip" f_zip ${f} ) 433 file( REMOVE ${f_zip} ) 434 file( RENAME ${f} ${f_zip} ) 435 endforeach( ) 436 message( "${CMAKE_CURRENT_BINARY_DIR}/*.zip" ) 437 file( GLOB default_zips "${CMAKE_CURRENT_BINARY_DIR}/*.zip" ) 438 message( STATUS "default_zips = ${default_zips} " ) 439 if( default_zips ) 440 install( FILES ${default_zips} 441 DESTINATION bin/stdlib/DefaultPackages 442 COMPONENT RUNTIME ) 443 endif( ) 444 endif( WGET_FOUND ) 376 445 377 446 #message( STATUS "ALL_HEADERS_LIST ${ALL_HEADERS_LIST}" )
Note: See TracChangeset
for help on using the changeset viewer.
