Skip to content

Commit

Permalink
Merge branch 'master' into 2014_R2
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Cercueil committed May 12, 2015
2 parents 7ecf37b + d84e05c commit c273b2d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
14 changes: 9 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,20 @@ install(FILES ${LIBIIO_PC} DESTINATION "${INSTALL_PKGCONFIG_DIR}")
#set(SETUP_PY ${CMAKE_CURRENT_SOURCE_DIR}/bindings/python/setup.py)
#configure_file(python/setup.py.in ${SETUP_PY} @ONLY)

add_library(libiio ${LIBIIO_CFILES} ${LIBIIO_HEADERS})
set_target_properties(libiio PROPERTIES VERSION ${VERSION} SOVERSION ${LIBIIO_VERSION_MAJOR})
target_link_libraries(libiio LINK_PRIVATE ${LIBS_TO_LINK})
add_library(iio ${LIBIIO_CFILES} ${LIBIIO_HEADERS})
set_target_properties(iio PROPERTIES VERSION ${VERSION} SOVERSION ${LIBIIO_VERSION_MAJOR})
target_link_libraries(iio LINK_PRIVATE ${LIBS_TO_LINK})

if (MSVC)
set_target_properties(iio PROPERTIES OUTPUT_NAME libiio)
endif()

if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
install(FILES ${LIBIIO_HEADERS} DESTINATION "${INSTALL_INC_DIR}")
endif()

if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
install(TARGETS libiio
install(TARGETS iio
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
RUNTIME DESTINATION "${INSTALL_BIN_DIR}")
Expand All @@ -180,7 +184,7 @@ if(DOXYGEN_FOUND)
set(HTML_DEST_DIR ${CMAKE_BINARY_DIR}/html)
file(COPY ${CMAKE_SOURCE_DIR}/doc DESTINATION ${HTML_DEST_DIR})

add_custom_command(TARGET libiio POST_BUILD
add_custom_command(TARGET iio POST_BUILD
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
Expand Down
2 changes: 1 addition & 1 deletion iiod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
set(IIOD_CFILES iiod.c ops.c ${BISON_parser_OUTPUTS} ${FLEX_lexer_OUTPUTS})

add_executable(iiod ${IIOD_CFILES})
target_link_libraries(iiod libiio ${PTHREAD_LIBRARIES} ${AVAHI_LIBRARIES})
target_link_libraries(iiod iio ${PTHREAD_LIBRARIES} ${AVAHI_LIBRARIES})

if(NOT SKIP_INSTALL_ALL)
install(TARGETS iiod RUNTIME DESTINATION sbin)
Expand Down
10 changes: 5 additions & 5 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ add_executable(iio_info iio_info.c)
add_executable(iio_readdev iio_readdev.c)
add_executable(iio_reg iio_reg.c)

target_link_libraries(iio_genxml libiio)
target_link_libraries(iio_info libiio)
target_link_libraries(iio_readdev libiio)
target_link_libraries(iio_reg libiio)
target_link_libraries(iio_genxml iio)
target_link_libraries(iio_info iio)
target_link_libraries(iio_readdev iio)
target_link_libraries(iio_reg iio)

if(PTHREAD_LIBRARIES)
project(iio_adi_xflow_check C)
add_executable(iio_adi_xflow_check iio_adi_xflow_check.c)
target_link_libraries(iio_adi_xflow_check libiio pthread)
target_link_libraries(iio_adi_xflow_check iio pthread)
endif()

if(NOT SKIP_INSTALL_ALL)
Expand Down

0 comments on commit c273b2d

Please sign in to comment.