lemon-project-template-glpk

comparison CMakeLists.txt @ 8:dda9b6665fde

Improved install locations
author Alpar Juttner <alpar@cs.elte.hu>
date Tue, 22 Mar 2011 20:26:58 +0100
parents c941f748eaa8
children 5545663ca997
comparison
equal deleted inserted replaced
6:151033071746 7:45e6975b3b07
14 14
15 ## Do not edit this. 15 ## Do not edit this.
16 PROJECT(${PROJECT_NAME}) 16 PROJECT(${PROJECT_NAME})
17 17
18 SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) 18 SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
19
20 IF(UNIX)
21 SET(INSTALL_BIN_DIR "bin" CACHE STRING
22 "Subdir for installing the binaries")
23 SET(INSTALL_DOC_DIR "share/doc/${PROJECT_NAME}"
24 CACHE STRING
25 "Subdir for installing the doc")
26 SET(INSTALL_DATA_DIR "share/data/${PROJECT_NAME}"
27 CACHE STRING
28 "Subdir for installing the map data")
29 SET(INSTALL_EXAMPLES_DIR "share/doc/${PROJECT_NAME}/examples"
30 CACHE STRING
31 "Subdir for installing the examples")
32 ELSE(UNIX)
33 SET(INSTALL_BIN_DIR "." CACHE STRING
34 "Subdir for installing the binaries")
35 SET(INSTALL_DOC_DIR "doc" CACHE STRING
36 "Subdir for installing the doc")
37 SET(INSTALL_DATA_DIR "data" CACHE STRING
38 "Subdir for installing the map data")
39 SET(INSTALL_EXAMPLES_DIR "examples" CACHE STRING
40 "Subdir for installing the examples")
41 ENDIF(UNIX)
19 42
20 ## The next part looks for LEMON. Typically, you don't want to modify it. 43 ## The next part looks for LEMON. Typically, you don't want to modify it.
21 ## 44 ##
22 ## First, it tries to use LEMON as a CMAKE subproject by looking for 45 ## First, it tries to use LEMON as a CMAKE subproject by looking for
23 ## it in the 'lemon' or 'deps/lemon' subdirectories or in directory 46 ## it in the 'lemon' or 'deps/lemon' subdirectories or in directory
59 ${PROJECT_SOURCE_DIR} 82 ${PROJECT_SOURCE_DIR}
60 ${PROJECT_BINARY_DIR} 83 ${PROJECT_BINARY_DIR}
61 ${LEMON_INCLUDE_DIRS} 84 ${LEMON_INCLUDE_DIRS}
62 ) 85 )
63 86
87 IF(CMAKE_COMPILER_IS_GNUCXX)
88 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
89 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
90 ENDIF(CMAKE_COMPILER_IS_GNUCXX)
64 ADD_SUBDIRECTORY(src) 91 ADD_SUBDIRECTORY(src)
65 92
66 ## Sometimes MSVC overwhelms you with compiler warnings which are impossible to 93 ## Sometimes MSVC overwhelms you with compiler warnings which are impossible to
67 ## avoid. Then comment out these sections. Normally you won't need it as the 94 ## avoid. Then comment out these sections. Normally you won't need it as the
68 ## LEMON include headers suppress these warnings anyway. 95 ## LEMON include headers suppress these warnings anyway.
102 ## NSIS installer, i.e. these variables: 129 ## NSIS installer, i.e. these variables:
103 ## 130 ##
104 ## - CPACK_NSIS_MUI_ICON 131 ## - CPACK_NSIS_MUI_ICON
105 ## - CPACK_PACKAGE_ICON 132 ## - CPACK_PACKAGE_ICON
106 ## - CPACK_NSIS_INSTALLED_ICON_NAME 133 ## - CPACK_NSIS_INSTALLED_ICON_NAME
107 ## 134 ##
108 ## and/or the files they point to. 135 ## and/or the files they point to.
109 ####################################################################### 136 #######################################################################
110 137
111 IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) 138 IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
112 SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) 139 SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
118 SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) 145 SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
119 146
120 SET(CPACK_PACKAGE_INSTALL_DIRECTORY 147 SET(CPACK_PACKAGE_INSTALL_DIRECTORY
121 "${PROJECT_NAME}") 148 "${PROJECT_NAME}")
122 SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY 149 SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
123 "${PROJECT_NAME}") 150 "${PROJECT_NAME} ${PROJECT_VERSION}")
124 151
125 SET(CPACK_COMPONENTS_ALL 152 SET(CPACK_COMPONENTS_ALL bin doc)
126 html_documentation
127 bin)
128 153
129 SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities") 154 SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Executables")
130 SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
131
132 SET(CPACK_COMPONENT_BIN_DESCRIPTION 155 SET(CPACK_COMPONENT_BIN_DESCRIPTION
133 "Command line utilities") 156 "Command line utilities")
134 SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION 157 SET(CPACK_COMPONENT_BIN_REQUIRED TRUE)
135 "Doxygen generated documentation")
136 158
159 SET(CPACK_COMPONENT_DOC_DISPLAY_NAME "Documentation")
160 SET(CPACK_COMPONENT_DOC_DESCRIPTION
161 "Documentation generated by Doxygen.")
162
163
137 SET(CPACK_GENERATOR "NSIS") 164 SET(CPACK_GENERATOR "NSIS")
138 165
139 SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon-project.ico") 166 SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon-project.ico")
140 SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico") 167 SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
141 SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp") 168 SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")