summaryrefslogtreecommitdiff
path: root/cmake/config/common.cmake
blob: b544ec55283ee6b633730198cd0face3ac9d4607 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
include(CheckSymbolExists)
include(CheckIncludeFile)
include(CheckTypeSize)
include(FindPkgConfig)
include(CTest)
find_package(Threads REQUIRED)

pkg_check_modules(CHECK check)

EFL_OPTION(BUILD_PROFILE "How to build EFL" dev CHOICE release;dev;debug)
EFL_OPTION(EFL_NOLEGACY_API_SUPPORT "Whenever to disable non-Eo (Legacy) APIs" ON)
EFL_OPTION(EFL_EO_API_SUPPORT "Whenever to enable new Eo APIs" ON)
if(NOT EFL_EO_API_SUPPORT)
  EFL_OPTION_SET_MESSAGE(EFL_EO_API_SUPPORT "Risky!")
endif()


#define all our header / function checks
include(./CommonHeaderChecks)

CHECK_APPEND_DEFINE(EFL_BETA_API_SUPPORT 1)
if(CMAKE_THREAD_LIBS_INIT)
  set(EFL_HAVE_THREADS 1)
endif()
CHECK_APPEND_DEFINE(EFL_HAVE_THREADS "${EFL_HAVE_THREADS}")

CHECK_APPEND_DEFINE(MODULE_ARCH "\"v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}\"")
CHECK_APPEND_DEFINE(SHARED_LIB_SUFFIX "\"${CMAKE_SHARED_LIBRARY_SUFFIX}\"")
CHECK_APPEND_DEFINE(EXEEXT "\"${CMAKE_EXECUTABLE_SUFFIX}\"")

# TODO: change code and remove:
CHECK_APPEND_DEFINE(VMAJ ${PROJECT_VERSION_MAJOR})
CHECK_APPEND_DEFINE(VMIN ${PROJECT_VERSION_MINOR})
CHECK_APPEND_DEFINE(VMIC ${PROJECT_VERSION_PATCH})
CHECK_APPEND_DEFINE(VREV ${PROJECT_VERSION_TWEAK})