CMakeLists.txt 720 B

123456789101112131415161718192021222324252627282930313233
  1. cmake_minimum_required(VERSION 2.6)
  2. PROJECT(opkg C)
  3. OPTION(HOST_CPU "Override Host CPU")
  4. OPTION(BUILD_CPU "Override Host CPU")
  5. OPTION(STATIC_UBOX "Statically link libubox")
  6. OPTION(BUILD_TESTS "Build test programs" ON)
  7. IF(NOT HOST_CPU)
  8. SET(HOST_CPU "${CMAKE_HOST_SYSTEM_PROCESSOR}")
  9. ENDIF()
  10. IF(NOT BUILD_CPU)
  11. SET(BUILD_CPU "${CMAKE_SYSTEM_PROCESSOR}")
  12. ENDIF()
  13. ADD_DEFINITIONS(-Os -Wall --std=gnu99 -g3 -Wmissing-declarations
  14. -DDATADIR="/usr/share"
  15. -DOPKGETCDIR="/etc"
  16. -DOPKGLOCKFILE="/var/lock/opkg.lock"
  17. -DOPKGLIBDIR="/usr/lib"
  18. -DHOST_CPU_STR="${HOST_CPU}"
  19. -DBUILD_CPU=${BUILD_CPU}
  20. )
  21. ADD_SUBDIRECTORY(libbb)
  22. ADD_SUBDIRECTORY(libopkg)
  23. ADD_SUBDIRECTORY(src)
  24. IF(BUILD_TESTS)
  25. ADD_SUBDIRECTORY(tests)
  26. ENDIF()