Skip to content

Commit

Permalink
Merge branch 'cpack'
Browse files Browse the repository at this point in the history
  • Loading branch information
matwey committed Dec 21, 2020
2 parents aa7e661 + 96c923c commit aa594db
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
18 changes: 18 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ matrix:
VCPKG_TARGET_TRIPLET: x64-windows
- image: Visual Studio 2015
GENERATOR: Unix Makefiles
allow_failures:
- GENERATOR: MSYS Makefiles

for:
-
Expand Down Expand Up @@ -106,6 +108,22 @@ before_build:
- cmake -G"%GENERATOR%" -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=%VCPKG_TARGET_TRIPLET% -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DBUILD_SHARED_LIBS:BOOL=on ..
build_script:
- cmake --build . --config %CONFIGURATION%
- cmake --build . --config %CONFIGURATION% --target package
test_script:
- ctest --output-on-failure
cache: c:\tools\vcpkg\installed

artifacts:
- path: 'build/*.zip'
name: Installer

deploy:
provider: GitHub
auth_token:
secure: vS1tzVAgt5X3XMnX0ioCMmr43MPQdP+im29avhhQOaRZ2BB8QRdtoRdOMmzARBmS
artifact: Installer
draft: true
on:
APPVEYOR_REPO_TAG: true
branch: master
configuration: Release
19 changes: 13 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ if(NOT ${OPENVIZSLA_LIBRARY_TYPE} STREQUAL "STATIC_LIBRARY")

add_library(openvizsla_static STATIC EXCLUDE_FROM_ALL ${SOURCES})
target_link_libraries(openvizsla_static LibZip::zip ${LIBRARIES})
set_target_properties(openvizsla_static PROPERTIES
ARCHIVE_OUTPUT_NAME openvizsla)
if(NOT WIN32)
set_target_properties(openvizsla_static PROPERTIES
ARCHIVE_OUTPUT_NAME openvizsla)
endif()
target_compile_definitions(openvizsla_static PUBLIC "_XOPEN_SOURCE;_XOPEN_SOURCE_EXTENDED")
target_compile_definitions(openvizsla_static PRIVATE "OPENVIZSLA_STATIC_DEFINE")

Expand Down Expand Up @@ -137,11 +139,16 @@ foreach(test_source IN ITEMS ${TESTS})
endforeach(test_source)

install(TARGETS openvizsla
DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES "include/openvizsla.h"
DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/openvizsla)
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvizsla)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/openvizsla_export.h"
DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/openvizsla)
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvizsla)
configure_file("openvizsla.pc.in" "openvizsla.pc" @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/openvizsla.pc"
DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig")
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")

if(WIN32)
set(CPACK_GENERATOR "ZIP")
include(CPack)
endif()

0 comments on commit aa594db

Please sign in to comment.