mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
[windows] New repo for external dependencies
Separate fils for zlib, TCL/TK and OCC dependencies to fix the superbuild with USE_GUI=OFF Download dependencies from github.com/NGSolve/ngsolve_dependencies
This commit is contained in:
parent
0b1d4e3658
commit
03f73094e9
@ -16,6 +16,10 @@ macro(set_vars VAR_OUT)
|
||||
endmacro()
|
||||
#######################################################################
|
||||
if(WIN32)
|
||||
set (DEPS_DOWNLOAD_URL "https://github.com/NGSolve/ngsolve_dependencies/releases/download/v1.0.0" CACHE STRING INTERNAL)
|
||||
set (OCC_DOWNLOAD_URL_WIN "${DEPS_DOWNLOAD_URL}/occ_win64.zip" CACHE STRING INTERNAL)
|
||||
set (TCLTK_DOWNLOAD_URL_WIN "${DEPS_DOWNLOAD_URL}/tcltk_win64.zip" CACHE STRING INTERNAL)
|
||||
set (ZLIB_DOWNLOAD_URL_WIN "${DEPS_DOWNLOAD_URL}/zlib_win64.zip" CACHE STRING INTERNAL)
|
||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
string(REGEX REPLACE "/W[0-4]" "/W0" CMAKE_CXX_FLAGS_NEW ${CMAKE_CXX_FLAGS})
|
||||
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_NEW} CACHE STRING "compile flags" FORCE)
|
||||
@ -28,16 +32,6 @@ if(WIN32)
|
||||
set(CMAKE_EXE_LINKER_FLAGS"${CMAKE_EXE_LINKER_FLAGS_NEW}/IGNORE:4217,4049" CACHE STRING "compile flags" FORCE)
|
||||
|
||||
endif(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
|
||||
if(${CMAKE_SIZEOF_VOID_P} MATCHES 4)
|
||||
# 32 bit
|
||||
set(EXT_LIBS_DOWNLOAD_URL_WIN "http://www.asc.tuwien.ac.at/~mhochsteger/ngsuite/ext_libs32.zip" CACHE STRING INTERNAL)
|
||||
set(OCC_DOWNLOAD_URL_WIN "http://www.asc.tuwien.ac.at/~mhochsteger/ngsuite/occ32.zip" CACHE STRING INTERNAL)
|
||||
else(${CMAKE_SIZEOF_VOID_P} MATCHES 4)
|
||||
# 64 bit
|
||||
set(EXT_LIBS_DOWNLOAD_URL_WIN "http://www.asc.tuwien.ac.at/~mhochsteger/ngsuite/ext_libs64.zip" CACHE STRING INTERNAL)
|
||||
set(OCC_DOWNLOAD_URL_WIN "http://www.asc.tuwien.ac.at/~mhochsteger/ngsuite/occ64.zip" CACHE STRING INTERNAL)
|
||||
endif(${CMAKE_SIZEOF_VOID_P} MATCHES 4)
|
||||
endif(WIN32)
|
||||
|
||||
if(UNIX)
|
||||
@ -93,6 +87,7 @@ endif(USE_OCC AND WIN32 AND NOT OCC_INCLUDE_DIR)
|
||||
|
||||
#######################################################################
|
||||
|
||||
include(cmake/external_projects/zlib.cmake)
|
||||
if(USE_GUI)
|
||||
include(cmake/external_projects/tcltk.cmake)
|
||||
endif(USE_GUI)
|
||||
|
@ -75,8 +75,8 @@ list(APPEND NETGEN_DEPENDENCIES project_tkdnd)
|
||||
|
||||
elseif(WIN32)
|
||||
|
||||
ExternalProject_Add(project_win_extlibs
|
||||
URL ${EXT_LIBS_DOWNLOAD_URL_WIN}
|
||||
ExternalProject_Add(project_win_tcltk
|
||||
URL ${TCLTK_DOWNLOAD_URL_WIN}
|
||||
UPDATE_COMMAND "" # Disable update
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND ""
|
||||
@ -87,10 +87,10 @@ elseif(WIN32)
|
||||
|
||||
set (TK_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/include)
|
||||
set (TCL_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/include)
|
||||
set (TCL_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/tcl86.lib)
|
||||
set (TK_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/tk86.lib)
|
||||
set (TCL_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/tcl86t.lib)
|
||||
set (TK_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/tk86t.lib)
|
||||
|
||||
list(APPEND NETGEN_DEPENDENCIES project_win_extlibs)
|
||||
list(APPEND NETGEN_DEPENDENCIES project_win_tcltk)
|
||||
else(WIN32)
|
||||
find_package(TCL 8.5 REQUIRED)
|
||||
# ExternalProject_Add(project_tkdnd
|
||||
|
16
cmake/external_projects/zlib.cmake
Normal file
16
cmake/external_projects/zlib.cmake
Normal file
@ -0,0 +1,16 @@
|
||||
if(WIN32)
|
||||
|
||||
ExternalProject_Add(project_win_zlib
|
||||
URL ${ZLIB_DOWNLOAD_URL_WIN}
|
||||
UPDATE_COMMAND "" # Disable update
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory . ${CMAKE_INSTALL_PREFIX}
|
||||
LOG_DOWNLOAD 1
|
||||
)
|
||||
|
||||
|
||||
list(APPEND NETGEN_DEPENDENCIES project_win_zlib)
|
||||
endif(WIN32)
|
||||
|
Loading…
Reference in New Issue
Block a user