Skip to content

Commit

Permalink
Minor bug fixes, add runtime installation directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
hsorby committed Oct 7, 2017
1 parent 58d6de7 commit 52554c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,17 @@ cmake_minimum_required(VERSION 3.0)
project(libxml2 LANGUAGES C CXX VERSION 2.7.6)

option(BUILD_TESTS "${PROJECT_NAME} - Build tests" ON)
option(PACKAGE_CONFIG_DIR "Directory for package config files (relative to CMAKE_INSTALL_PREFIX)" "lib/cmake")
option(WITH_ZLIB "Build in zlib support" ON)
option(BUILD_SHARED_LIBS "Build shared library." ON)
set(PACKAGE_CONFIG_DIR lib/cmake CACHE STRING "Directory for package config files (relative to CMAKE_INSTALL_PREFIX)")

if (WITH_ZLIB)
find_package(ZLIB ${ZLIB_VERSION} REQUIRED)
endif()

if(NOT BUILD_SHARED_LIBS)
set(LIBRARY_INSTALL_TYPE ARCHIVE )
ELSE()
else()
set(LIBRARY_INSTALL_TYPE LIBRARY )
if(WIN32 )
set(LIBRARY_INSTALL_TYPE RUNTIME )
Expand Down Expand Up @@ -359,6 +360,7 @@ endif()
install(TARGETS xml2
EXPORT libxml2-config
DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include/libxml2)
install(FILES ${PUBLIC_HDRS}
DESTINATION include/libxml2/libxml)
Expand All @@ -378,4 +380,3 @@ install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-dependencies.cmake
DESTINATION ${PACKAGE_CONFIG_DIR})


0 comments on commit 52554c9

Please sign in to comment.