CMakeLists.txt 875 B

1234567891011121314151617181920212223242526
  1. cmake_minimum_required(VERSION 2.6)
  2. PROJECT(opkg-tests C)
  3. INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libopkg ${CMAKE_CURRENT_SOURCE_DIR}/..)
  4. LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libopkg ${CMAKE_CURRENT_SOURCE_DIR}/../libbb)
  5. IF(STATIC_UBOX)
  6. FIND_LIBRARY(ubox NAMES libubox.a)
  7. ELSE()
  8. FIND_LIBRARY(ubox NAMES ubox)
  9. ENDIF()
  10. FIND_LIBRARY(pthread NAMES pthread)
  11. ADD_EXECUTABLE(libopkg_test libopkg_test.c)
  12. TARGET_LINK_LIBRARIES(libopkg_test bb opkg bb ${ubox} ${pthread})
  13. ADD_EXECUTABLE(opkg_active_list_test opkg_active_list_test.c)
  14. TARGET_LINK_LIBRARIES(opkg_active_list_test bb opkg bb ${ubox} ${pthread})
  15. ADD_EXECUTABLE(opkg_extract_test opkg_extract_test.c)
  16. TARGET_LINK_LIBRARIES(opkg_extract_test bb opkg bb ${ubox} ${pthread})
  17. #ADD_EXECUTABLE(opkg_hash_test opkg_hash_test.c)
  18. #TARGET_LINK_LIBRARIES(opkg_hash_test bb opkg bb ${ubox} ${pthread})