-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Windows dependencies Added missing dependencies for Appveyor Added CMakeLists.txt to hopsandcp Add missing calls to dependency scripts for Appveyor Correct include directories in CMake Build all dependencies with ci-build Added Linux script for setting up DCPLib Set executable permission to DCPLib install script Added include path to libzip Fix Linux setup script for libzip Add include paths to Xerces and Asio Add include path to libzip Fix compilation error without ZMQ Remove pause from Xerces setup script Added missing include Add patch to DCPLib code to fix a missing include Add logging define to DCPLib to resolve compilation error Patch for missing function in DCPLib Enable LOGGING flag in hopsandcp Specify release build for Zlib on Windows Correct use of define in call to CMake Make Cmake define public Changed to forward slashes in CMake path Remove unneeded patch Added hopsandcp dependency to HopsanGUI Added libzip dependency to HopsanCore Patch DCPLib to make IpToString function inlined Fix release build for zlib Fix CMake build Add check for MinGW compiler flag Add Zlib, add DCPLib to setup scripts Fix Linux compilation Compilation fixes Test local libzip in ci-build Attempt to fix MSVC compilation Add Zlib setup script to Appveyor Attempt to fix MSVC linking Attempt to fix patch command for msvc Fix patch for Windows builds Attempt to link Xerces with MSVC Find local xerces with msvc Attempt to fix libzip linking on msvc
- Loading branch information
Showing
29 changed files
with
405 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
5c5 | ||
< std::string ipToString(const uint32_t ip) { | ||
--- | ||
> inline std::string ipToString(const uint32_t ip) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
set(local_libzip_dir ${CMAKE_CURRENT_LIST_DIR}/libzip) | ||
if(WIN32) | ||
set(CMAKE_FIND_LIBRARY_PREFIXES lib) | ||
endif(WIN32) | ||
find_library(libzip NAMES ${CMAKE_FIND_LIBRARY_PREFIXES}zip ${CMAKE_FIND_LIBRARY_PREFIXES}zip${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_STATIC_LIBRARY_PREFIX}zip${CMAKE_STATIC_LIBRARY_SUFFIX} PATHS ${local_libzip_dir}/lib NO_DEFAULT_PATH) | ||
|
||
if (libzip) | ||
message(STATUS "Found local libzip") | ||
add_library(libzip STATIC IMPORTED) | ||
if (MSVC) | ||
set_target_properties(libzip PROPERTIES | ||
IMPORTED_LOCATION ${local_libzip_dir}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}zip${CMAKE_STATIC_LIBRARY_SUFFIX} | ||
INTERFACE_INCLUDE_DIRECTORIES ${local_libzip_dir}/include) | ||
elseif (MINGW) | ||
set_target_properties(libzip PROPERTIES | ||
IMPORTED_LOCATION ${local_libzip_dir}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}zip${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX} | ||
INTERFACE_INCLUDE_DIRECTORIES ${local_libzip_dir}/include) | ||
else() | ||
set_target_properties(libzip PROPERTIES | ||
IMPORTED_LOCATION ${local_libzip_dir}/lib/libzip.so | ||
INTERFACE_INCLUDE_DIRECTORIES ${local_libzip_dir}/include) | ||
endif() | ||
|
||
else() | ||
message(STATUS "Looking for libzip in system") | ||
find_package(libzip CONFIG) # Search in system | ||
if (libzip_FOUND) | ||
message(STATUS "Found libzip") | ||
add_library(libzip STATIC IMPORTED) | ||
else() | ||
message(WARNING "Could not find libzip") | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
libzip_dir = $${PWD}/libzip | ||
zlib_dir = $${PWD}/zlib | ||
message(libzip_dir) | ||
exists($${libzip_dir}) { | ||
INCLUDEPATH *= $${libzip_dir}/include | ||
LIBS *= -L$${libzip_dir}/bin -lzip | ||
|
||
macx { | ||
# Not supported | ||
} win32 { | ||
src_file = $$quote($${libzip_dir}/bin/libzip.dll) | ||
src_file_zlib = $$quote($${zlib_dir}/bin/libzlib.dll) | ||
dst_dir = $$quote($${PWD}/../bin) | ||
# Replace slashes in paths with backslashes for Windows | ||
src_file ~= s,/,\\,g | ||
src_file_zlib ~= s,/,\\,g | ||
dst_dir ~= s,/,\\,g | ||
|
||
QMAKE_POST_LINK += $$QMAKE_COPY $${src_file} $${dst_dir} $$escape_expand(\\n\\t) | ||
QMAKE_POST_LINK += $$QMAKE_COPY $${src_file_zlib} $${dst_dir} $$escape_expand(\\n\\t) | ||
} else { | ||
# Note! The RPATH is absolute and only meant for dev builds in the IDE, on release runtime paths should be stripped | ||
unix:QMAKE_RPATHDIR *= $${libzip_dir/bin} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,6 @@ | |
./setupKatex.sh | ||
./setupTclap.sh | ||
./setupHDF5.sh | ||
./setupAsio.sh | ||
./setupXerces.sh | ||
./setupLibzip.sh | ||
./setupDCPLib.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@ECHO OFF | ||
REM Bat script building libzip dependency automatically | ||
|
||
setlocal | ||
set basedir=%~dp0 | ||
set name=dcplib | ||
set codedir=%basedir%\%name%-code | ||
set builddir=%basedir%\%name%-build | ||
set installdir=%basedir%\%name% | ||
|
||
set xercesdir=%basedir:\=/%xerces | ||
|
||
call setHopsanBuildPaths.bat | ||
|
||
"%git_path%\..\usr\bin\patch" dcplib-code/include/core/dcp/model/pdu/IpToStr.hpp dcplib-patch.txt | ||
|
||
mkdir %builddir% | ||
cd %builddir% | ||
cmake -Wno-dev -G %HOPSAN_BUILD_CMAKE_GENERATOR% -DLOGGING=ON -DASIO_ROOT="%basedir%\asio-code" -DXercesC_LIBRARY="%xercesdir%/bin/libxerces-c.dll" -DXercesC_INCLUDE_DIR="%xercesdir%/include" -DXercesC_VERSION="3.2.2" -DZIP_LIBRARY="%basedir%\libzip\bin\libzip.dll" -DZIP_INCLUDE_DIR="%basedir%\libzip\include" -DCMAKE_INSTALL_PREFIX="%installdir%" %codedir% | ||
cmake --build . --parallel 8 | ||
cmake --build . --target install | ||
|
||
cd %basedir% | ||
echo. | ||
echo setupDCPLib.bat done | ||
if "%HOPSAN_BUILD_SCRIPT_NOPAUSE%" == "" ( | ||
pause | ||
) | ||
endlocal |
Oops, something went wrong.