-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
53 lines (35 loc) · 1.5 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
PROJECT (ora)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
ADD_DEFINITIONS(-g)
SET(DEBUG_DEFAULT FALSE CACHE BOOL "Enable debug output by default")
IF (DEBUG_DEFAULT)
ADD_DEFINITIONS(-DDEBUG)
ENDIF(DEBUG_DEFAULT)
FIND_PACKAGE(ZLIB REQUIRED)
FIND_PACKAGE(PNG REQUIRED)
FIND_PACKAGE(EXPAT REQUIRED)
ADD_DEFINITIONS(${PNG_DEFINITIONS})
LINK_LIBRARIES(${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${EXPAT_LIBRARIES} ora)
INCLUDE_DIRECTORIES(AFTER ${ZLIB_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${EXPAT_INCLUDE_DIRS} src/lib)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
ADD_SUBDIRECTORY(src/lib)
ADD_SUBDIRECTORY(src/tool)
#IF (WIN32)
# INSTALL(TARGETS ora RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX})
# INSTALL(FILES ${HEADER_FILES} DESTINATION include)
#ENDIF (WIN32)
SET(GENERATE_DOC FALSE CACHE BOOL "Generate Doxygen documentation")
IF (GENERATE_DOC)
FIND_PACKAGE(Doxygen REQUIRED)
CONFIGURE_FILE(doxygen.in ${CMAKE_BINARY_DIR}/doxygen.config @ONLY)
MAKE_DIRECTORY(${CMAKE_BINARY_DIR}/doc/)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/doc/index.php ${CMAKE_BINARY_DIR}/doxygen.config
COMMAND ${DOXYGEN_EXECUTABLE}
${CMAKE_BINARY_DIR}/doxygen.config
DEPENDS ${HEADER_FILES}
COMMENT "Building libora Documentation"
)
ADD_CUSTOM_TARGET(OraDoc ALL DEPENDS ${CMAKE_BINARY_DIR}/doc/index.php)
ENDIF (GENERATE_DOC)