Commit c24a71a1 authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

cmake: compile help executables

parent db4ddb32
......@@ -278,6 +278,4 @@ install(FILES ${LINPHONE_HEADER_FILES}
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
if(ENABLE_DOC)
add_subdirectory(help)
endif()
add_subdirectory(help)
......@@ -20,26 +20,51 @@
#
############################################################################
find_package(Doxygen)
if (ENABLE_DOC)
find_package(Doxygen)
if(DOXYGEN_FOUND)
if(DOXYGEN_DOT_FOUND)
set(top_srcdir "${CMAKE_CURRENT_LIST_DIR}/../../")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
file(GLOB DOC_INPUT_FILES
[^.]*.c
[^.]*.dox
../[^.]*.h
../[^.]*.c
)
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/doc/html/index.html"
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ${DOC_INPUT_FILES}
)
add_custom_target(linphone-doc ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/doc/html/index.html")
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc/html" "${CMAKE_CURRENT_BINARY_DIR}/doc/xml"
DESTINATION "${CMAKE_INSTALL_DATADIR}/doc/linphone-${LINPHONE_VERSION}")
else()
message(WARNING "The dot program is needed to generate the linphone documentation. You can get it from http://www.graphviz.org/.")
endif()
endif()
endif()
if(DOXYGEN_FOUND)
if(DOXYGEN_DOT_FOUND)
set(top_srcdir "${CMAKE_CURRENT_LIST_DIR}/../../")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
file(GLOB DOC_INPUT_FILES
[^.]*.c
[^.]*.dox
../[^.]*.h
../[^.]*.c
)
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/doc/html/index.html"
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ${DOC_INPUT_FILES}
)
add_custom_target(linphone-doc ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/doc/html/index.html")
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc/html" "${CMAKE_CURRENT_BINARY_DIR}/doc/xml"
DESTINATION "${CMAKE_INSTALL_DATADIR}/doc/linphone-${LINPHONE_VERSION}")
else()
message(WARNING "The dot program is needed to generate the linphone documentation. You can get it from http://www.graphviz.org/.")
if (ENABLE_TOOLS)
set(USE_BUNDLE )
if (IOS)
set(USE_BUNDLE MACOSX_BUNDLE)
endif()
add_definitions(-DIN_LINPHONE)
file(GLOB EXECUTABLES_SOURCE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
foreach(EXECUTABLE ${EXECUTABLES_SOURCE})
string(REPLACE ".c" "" EXECUTABLE_NAME ${EXECUTABLE})
apply_compile_flags(${EXECUTABLE} "CPP" "C")
add_executable(${EXECUTABLE_NAME} ${USE_BUNDLE} ${EXECUTABLE})
target_link_libraries(${EXECUTABLE_NAME} ${LINPHONE_LIBS_FOR_TOOLS} ${MEDIASTREAMER2_LIBRARIES})
set_target_properties(${EXECUTABLE_NAME} PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
if (NOT IOS)
install(TARGETS ${EXECUTABLE_NAME}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
endforeach()
endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment