186 FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake |
186 FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake |
187 DESTINATION cmake |
187 DESTINATION cmake |
188 ) |
188 ) |
189 ENDIF() |
189 ENDIF() |
190 |
190 |
|
191 CONFIGURE_FILE( |
|
192 ${PROJECT_SOURCE_DIR}/cmake/version.cmake.in |
|
193 ${PROJECT_BINARY_DIR}/cmake/version.cmake |
|
194 @ONLY |
|
195 ) |
|
196 |
|
197 SET(ARCHIVE_BASE_NAME ${CMAKE_PROJECT_NAME}) |
|
198 STRING(TOLOWER ${ARCHIVE_BASE_NAME} ARCHIVE_BASE_NAME) |
|
199 SET(ARCHIVE_NAME ${ARCHIVE_BASE_NAME}-${PROJECT_VERSION}) |
|
200 ADD_CUSTOM_TARGET(dist |
|
201 COMMAND cmake -E remove_directory ${ARCHIVE_NAME} |
|
202 COMMAND hg archive ${ARCHIVE_NAME} |
|
203 COMMAND cmake -E copy cmake/version.cmake ${ARCHIVE_NAME}/cmake/version.cmake |
|
204 COMMAND tar -czf ${ARCHIVE_BASE_NAME}-nodoc-${PROJECT_VERSION}.tar.gz ${ARCHIVE_NAME} |
|
205 COMMAND zip -r ${ARCHIVE_BASE_NAME}-nodoc-${PROJECT_VERSION}.zip ${ARCHIVE_NAME} |
|
206 COMMAND cmake -E copy_directory doc/html ${ARCHIVE_NAME}/doc/html |
|
207 COMMAND tar -czf ${ARCHIVE_NAME}.tar.gz ${ARCHIVE_NAME} |
|
208 COMMAND zip -r ${ARCHIVE_NAME}.zip ${ARCHIVE_NAME} |
|
209 COMMAND cmake -E copy_directory doc/html ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION} |
|
210 COMMAND tar -czf ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}.tar.gz ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION} |
|
211 COMMAND zip -r ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}.zip ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION} |
|
212 COMMAND cmake -E remove_directory ${ARCHIVE_NAME} |
|
213 COMMAND cmake -E remove_directory ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION} |
|
214 DEPENDS html |
|
215 WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) |
|
216 |
|
217 # CPACK config (Basically for NSIS) |
191 IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) |
218 IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) |
192 SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) |
219 SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) |
193 SET(CPACK_PACKAGE_VENDOR "EGRES") |
220 SET(CPACK_PACKAGE_VENDOR "EGRES") |
194 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY |
221 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY |
195 "LEMON - Library for Efficient Modeling and Optimization in Networks") |
222 "LEMON - Library for Efficient Modeling and Optimization in Networks") |