# HG changeset patch # User Alpar Juttner # Date 1300822018 -3600 # Node ID dda9b6665fdef13968f68af33762e37c2f465d9f # Parent c941f748eaa86117a5a6f5ff5847dd1143bdd2c5 Improved install locations diff -r c941f748eaa8 -r dda9b6665fde CMakeLists.txt --- a/CMakeLists.txt Tue Mar 22 20:09:43 2011 +0100 +++ b/CMakeLists.txt Tue Mar 22 20:26:58 2011 +0100 @@ -17,6 +17,29 @@ SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) +IF(UNIX) + SET(INSTALL_BIN_DIR "bin" CACHE STRING + "Subdir for installing the binaries") + SET(INSTALL_DOC_DIR "share/doc/${PROJECT_NAME}" + CACHE STRING + "Subdir for installing the doc") + SET(INSTALL_DATA_DIR "share/data/${PROJECT_NAME}" + CACHE STRING + "Subdir for installing the map data") + SET(INSTALL_EXAMPLES_DIR "share/doc/${PROJECT_NAME}/examples" + CACHE STRING + "Subdir for installing the examples") +ELSE(UNIX) + SET(INSTALL_BIN_DIR "." CACHE STRING + "Subdir for installing the binaries") + SET(INSTALL_DOC_DIR "doc" CACHE STRING + "Subdir for installing the doc") + SET(INSTALL_DATA_DIR "data" CACHE STRING + "Subdir for installing the map data") + SET(INSTALL_EXAMPLES_DIR "examples" CACHE STRING + "Subdir for installing the examples") +ENDIF(UNIX) + ## The next part looks for LEMON. Typically, you don't want to modify it. ## ## First, it tries to use LEMON as a CMAKE subproject by looking for @@ -61,6 +84,10 @@ ${LEMON_INCLUDE_DIRS} ) +IF(CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") +ENDIF(CMAKE_COMPILER_IS_GNUCXX) ADD_SUBDIRECTORY(src) ## Sometimes MSVC overwhelms you with compiler warnings which are impossible to @@ -104,7 +131,7 @@ ## - CPACK_NSIS_MUI_ICON ## - CPACK_PACKAGE_ICON ## - CPACK_NSIS_INSTALLED_ICON_NAME -## +## ## and/or the files they point to. ####################################################################### @@ -120,20 +147,20 @@ SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}") SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY - "${PROJECT_NAME}") + "${PROJECT_NAME} ${PROJECT_VERSION}") - SET(CPACK_COMPONENTS_ALL - html_documentation - bin) + SET(CPACK_COMPONENTS_ALL bin doc) - SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities") - SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation") - + SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Executables") SET(CPACK_COMPONENT_BIN_DESCRIPTION "Command line utilities") - SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION - "Doxygen generated documentation") + SET(CPACK_COMPONENT_BIN_REQUIRED TRUE) + SET(CPACK_COMPONENT_DOC_DISPLAY_NAME "Documentation") + SET(CPACK_COMPONENT_DOC_DESCRIPTION + "Documentation generated by Doxygen.") + + SET(CPACK_GENERATOR "NSIS") SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon-project.ico") diff -r c941f748eaa8 -r dda9b6665fde doc/CMakeLists.txt --- a/doc/CMakeLists.txt Tue Mar 22 20:09:43 2011 +0100 +++ b/doc/CMakeLists.txt Tue Mar 22 20:26:58 2011 +0100 @@ -23,6 +23,6 @@ ENDIF(UNIX) INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ - DESTINATION share/doc + DESTINATION ${INSTALL_DOC_DIR} COMPONENT html_documentation) ENDIF(DOXYGEN_EXECUTABLE) diff -r c941f748eaa8 -r dda9b6665fde src/CMakeLists.txt --- a/src/CMakeLists.txt Tue Mar 22 20:09:43 2011 +0100 +++ b/src/CMakeLists.txt Tue Mar 22 20:26:58 2011 +0100 @@ -24,6 +24,6 @@ INSTALL( TARGETS lemon-project - RUNTIME DESTINATION bin + RUNTIME DESTINATION ${INSTALL_BIN_DIR} COMPONENT bin )