\r
project(expat)\r
\r
-cmake_minimum_required(VERSION 2.6)\r
+cmake_minimum_required(VERSION 2.8.10)\r
set(PACKAGE_BUGREPORT "expat-bugs@libexpat.org")\r
set(PACKAGE_NAME "expat")\r
set(PACKAGE_VERSION "2.2.5")\r
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")\r
set(PACKAGE_TARNAME "${PACKAGE_NAME}")\r
\r
+include(GNUInstallDirs)\r
+\r
if(WINCE)\r
set(BUILD_tools_default OFF)\r
else()\r
endif()\r
endmacro()\r
\r
-expat_install(TARGETS expat RUNTIME DESTINATION bin\r
- LIBRARY DESTINATION lib\r
- ARCHIVE DESTINATION lib)\r
+expat_install(TARGETS expat RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}\r
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}\r
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})\r
\r
set(prefix ${CMAKE_INSTALL_PREFIX})\r
set(exec_prefix "\${prefix}")\r
set(includedir "\${prefix}/include")\r
configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc @ONLY)\r
\r
-expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION include)\r
-expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION lib/pkgconfig)\r
+expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})\r
+expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)\r
\r
if(BUILD_tools)\r
set(xmlwf_SRCS\r
add_executable(xmlwf ${xmlwf_SRCS})\r
set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf)\r
target_link_libraries(xmlwf expat)\r
- expat_install(TARGETS xmlwf DESTINATION bin)\r
+ expat_install(TARGETS xmlwf DESTINATION ${CMAKE_INSTALL_BINDIR})\r
if(BUILD_doc)\r
add_custom_command(TARGET expat PRE_BUILD COMMAND "${DOCBOOK_TO_MAN}" "${PROJECT_SOURCE_DIR}/doc/xmlwf.xml" && mv "XMLWF.1" "${PROJECT_SOURCE_DIR}/doc/xmlwf.1")\r
- expat_install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION share/man/man1)\r
+ expat_install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)\r
endif()\r
endif()\r
\r
#174 CMake: Introduce option WARNINGS_AS_ERRORS, defaults to OFF
#175 CMake: Prefer check_symbol_exists over check_function_exists
#176 CMake: Create the same pkg-config file as with GNU Autotools
+ #178 #179 CMake: Use GNUInstallDirs module to set proper defaults for
+ install directories
#131 #173 Address compiler warnings
Special thanks to: