2 set(CCTOOLS_VERSION_NUM 895.0)
4 add_definitions(-DALLOW_64BIT_LEB_ON_32B_TARGET=1)
6 # We need this on in the libraries as well as the apps.
8 add_definitions(-DLTO_SUPPORT)
9 set(LTO_SUPPORT_INFO "(with LLVM LTO support)")
12 string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
14 if(uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
15 add_definitions(-DDEBUG)
19 add_definitions(-DXTOOLS_BUGURL="${XTOOLS_BUGURL}")
23 add_definitions(-DPACKAGE_VERSION="${PACKAGE_VERSION}")
27 add_definitions(-DXTOOLS_VERSION="${XTOOLS_VERSION}")
30 option(CCTOOLS_EFITOOLS "Build efitools as part of cctools" OFF)
31 option(CCTOOLS_LD_CLASSIC "Build ld_classic as part of cctools" ON)
34 "${CMAKE_SOURCE_DIR}/cctools/cctools_version.c.in"
35 "${CMAKE_BINARY_DIR}/cctools/cctools_version.c"
38 add_subdirectory(libstuff)
39 add_subdirectory(cbtlibs)
41 if( EXISTS ${CMAKE_SOURCE_DIR}/cctools/as/CMakeLists.txt )
45 if( EXISTS ${CMAKE_SOURCE_DIR}/cctools/ar/CMakeLists.txt )
49 if( EXISTS ${CMAKE_SOURCE_DIR}/cctools/misc/CMakeLists.txt )
50 add_subdirectory(misc)
53 if( EXISTS ${CMAKE_SOURCE_DIR}/cctools/otool/CMakeLists.txt )
54 add_subdirectory(otool)
57 if (CCTOOLS_LD_CLASSIC)
58 if( EXISTS ${CMAKE_SOURCE_DIR}/cctools/ld/CMakeLists.txt )
61 message(WARNING "Asked to build ld_classic, but there's no CMakeList for it.")
66 if( EXISTS ${CMAKE_SOURCE_DIR}/cctools/efitools/CMakeLists.txt )
67 add_subdirectory(efitools)
69 message(WARNING "Asked to build efitools, but there's no CMakeList for them.")