Skip to content

Commit

Permalink
Merge pull request #15 from eternalharvest/feature/gnu_install_dirs
Browse files Browse the repository at this point in the history
Fix #14 GNUInstallDirs マクロを使用して適切なデフォルトインストール先を決定
Thx eternalharvest
  • Loading branch information
stz2012 authored Jul 17, 2018
2 parents 71f931e + 66b8fa3 commit 22fcf5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ environment:
MSYS2_DIR: msys64

CYGWIN_MIRROR: http://cygwin.mirror.constant.com
CYGWIN_PACKAGES: mpfr,mpc,gcc-core,gcc=g++,make,cmake
CYGWIN_PACKAGES: mpfr,mpc,gcc-core,gcc-g++,make,cmake

matrix:
# Latest version of VisualStudio
Expand Down
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.8.5)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE INTERNAL "limit build types" FORCE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "default build type")

set(CMAKE_INSTALL_SO_NO_EXE False)
set(CMAKE_LEGACY_CYGWIN_WIN32 False)

project(arib_std_b25 C)
enable_language(CXX)

include(GitRevision)
include(GenerateExportHeader)
include(GNUInstallDirs)
find_package(PCSC REQUIRED)

if (UNIX OR MSYS)
Expand Down Expand Up @@ -108,10 +108,10 @@ configure_file(src/version.rc.in version.rc @ONLY)
if(UNIX AND NOT CYGWIN)
configure_file(src/libarib25.pc.in ${CMAKE_SHARED_LIBRARY_PREFIX}${ARIB25_LIB_NAME}.pc @ONLY)

install(TARGETS b25 RUNTIME DESTINATION bin)
install(TARGETS arib25-static arib25-shared ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
install(FILES src/arib_std_b25.h src/b_cas_card.h src/multi2.h src/ts_section_parser.h src/portable.h ${CMAKE_CURRENT_BINARY_DIR}/arib25_api.h DESTINATION include/arib25)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${ARIB25_LIB_NAME}.pc DESTINATION lib/pkgconfig)
install(TARGETS b25 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS arib25-static arib25-shared ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES src/arib_std_b25.h src/b_cas_card.h src/multi2.h src/ts_section_parser.h src/portable.h ${CMAKE_CURRENT_BINARY_DIR}/arib25_api.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/arib25)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${ARIB25_LIB_NAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -DLDCONFIG_EXECUTABLE=${LDCONFIG_EXECUTABLE} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/PostInstall.cmake)")

add_custom_target(uninstall ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Uninstall.cmake)
Expand Down

0 comments on commit 22fcf5f

Please sign in to comment.