0
3
0
... | ... |
@@ -179,24 +179,51 @@ |
179 | 179 |
IF(UNIX) |
180 | 180 |
INSTALL( |
181 | 181 |
FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake |
182 | 182 |
DESTINATION share/lemon/cmake |
183 | 183 |
) |
184 | 184 |
ELSEIF(WIN32) |
185 | 185 |
INSTALL( |
186 | 186 |
FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake |
187 | 187 |
DESTINATION cmake |
188 | 188 |
) |
189 | 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 | 218 |
IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) |
192 | 219 |
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) |
193 | 220 |
SET(CPACK_PACKAGE_VENDOR "EGRES") |
194 | 221 |
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY |
195 | 222 |
"LEMON - Library for Efficient Modeling and Optimization in Networks") |
196 | 223 |
SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") |
197 | 224 |
|
198 | 225 |
SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) |
199 | 226 |
|
200 | 227 |
SET(CPACK_PACKAGE_INSTALL_DIRECTORY |
201 | 228 |
"${PROJECT_NAME} ${PROJECT_VERSION}") |
202 | 229 |
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY |
... | ... |
@@ -8,24 +8,33 @@ |
8 | 8 |
CONFIGURE_FILE( |
9 | 9 |
${PROJECT_SOURCE_DIR}/doc/Doxyfile.in |
10 | 10 |
${PROJECT_BINARY_DIR}/doc/Doxyfile |
11 | 11 |
@ONLY |
12 | 12 |
) |
13 | 13 |
|
14 | 14 |
CONFIGURE_FILE( |
15 | 15 |
${PROJECT_SOURCE_DIR}/doc/mainpage.dox.in |
16 | 16 |
${PROJECT_BINARY_DIR}/doc/mainpage.dox |
17 | 17 |
@ONLY |
18 | 18 |
) |
19 | 19 |
|
20 |
# Copy doc from source (if exists) |
|
21 |
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/html AND |
|
22 |
NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html) |
|
23 |
MESSAGE(STATUS "Copy doc from source tree") |
|
24 |
EXECUTE_PROCESS( |
|
25 |
COMMAND cmake -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/html ${CMAKE_CURRENT_BINARY_DIR}/html |
|
26 |
) |
|
27 |
ENDIF() |
|
28 |
|
|
20 | 29 |
IF(DOXYGEN_EXECUTABLE AND PYTHONINTERP_FOUND AND GHOSTSCRIPT_EXECUTABLE) |
21 | 30 |
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/) |
22 | 31 |
SET(GHOSTSCRIPT_OPTIONS -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha) |
23 | 32 |
ADD_CUSTOM_TARGET(html |
24 | 33 |
COMMAND ${CMAKE_COMMAND} -E remove_directory gen-images |
25 | 34 |
COMMAND ${CMAKE_COMMAND} -E make_directory gen-images |
26 | 35 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_matching.eps |
27 | 36 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_partitions.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_partitions.eps |
28 | 37 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/connected_components.eps |
29 | 38 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/edge_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/edge_biconnected_components.eps |
30 | 39 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/grid_graph.png ${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps |
31 | 40 |
COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/matching.eps |
0 comments (0 inline)