2012-04-05 08:31:15 -07:00
|
|
|
cmake_minimum_required(VERSION 2.6)
|
2012-05-01 00:40:14 -07:00
|
|
|
project(eo)
|
2012-04-16 09:02:41 -07:00
|
|
|
set(VMAJ 0)
|
|
|
|
set(VMIN 1)
|
|
|
|
set(VMIC 0)
|
|
|
|
set(PACKAGE_VERSION ${VMAJ}.${VMIN}.${VMIC})
|
2012-04-05 08:31:15 -07:00
|
|
|
|
|
|
|
set(PACKAGE ${CMAKE_PROJECT_NAME})
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
|
|
|
|
|
|
|
include_directories ("${PROJECT_BINARY_DIR}")
|
|
|
|
|
|
|
|
find_package(Eina REQUIRED)
|
|
|
|
find_package(Evas REQUIRED)
|
|
|
|
find_package(Elementary REQUIRED)
|
|
|
|
|
|
|
|
# likely put this into an FindCompilerAttribute.cmake:
|
|
|
|
INCLUDE(CheckCSourceCompiles)
|
|
|
|
SET(HAVE___ATTRIBUTE__)
|
|
|
|
CHECK_C_SOURCE_COMPILES(
|
|
|
|
"void foo (int bar __attribute__((unused)) ) { }
|
|
|
|
static void baz (void) __attribute__((unused));
|
|
|
|
static void baz (void) { }
|
|
|
|
int main(){}
|
|
|
|
" HAVE___ATTRIBUTE__
|
|
|
|
)
|
|
|
|
|
|
|
|
ADD_DEFINITIONS(-DPACKAGE_BIN_DIR="${CMAKE_INSTALL_PREFIX}/bin"
|
|
|
|
-DPACKAGE_DATA_DIR="${CMAKE_INSTALL_PREFIX}/share/${CMAKE_PROJECT_NAME}"
|
|
|
|
-DPACKAGE_LIB_DIR="${CMAKE_INSTALL_PREFIX}/lib")
|
|
|
|
|
|
|
|
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
|
|
|
|
|
|
|
configure_file (
|
|
|
|
"${PROJECT_SOURCE_DIR}/cmakeconfig.h.in"
|
|
|
|
"${PROJECT_BINARY_DIR}/config.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
include(EFLCheck)
|
|
|
|
|
|
|
|
add_subdirectory(lib)
|
|
|
|
add_subdirectory(examples/evas)
|
|
|
|
add_subdirectory(examples/mixin)
|
|
|
|
add_subdirectory(examples/signals)
|
|
|
|
add_subdirectory(examples/access)
|
|
|
|
add_subdirectory(examples/constructors)
|
2012-04-12 01:27:38 -07:00
|
|
|
add_subdirectory(examples/function_overrides)
|
2012-04-12 03:48:08 -07:00
|
|
|
add_subdirectory(examples/composite_objects)
|
2012-04-05 08:31:15 -07:00
|
|
|
|
|
|
|
add_subdirectory(tests EXCLUDE_FROM_ALL)
|
|
|
|
|
2012-04-16 05:36:42 -07:00
|
|
|
add_subdirectory(doc)
|
2012-04-16 08:27:32 -07:00
|
|
|
|
|
|
|
# PKGCONFIG file.
|
|
|
|
CONFIGURE_FILE(
|
2012-05-01 00:40:14 -07:00
|
|
|
"${PROJECT_SOURCE_DIR}/eo.pc.in"
|
|
|
|
"${PROJECT_BINARY_DIR}/eo.pc"
|
2012-04-16 09:02:41 -07:00
|
|
|
@ONLY
|
2012-04-16 08:27:32 -07:00
|
|
|
)
|
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
INSTALL(FILES "${PROJECT_BINARY_DIR}/eo.pc"
|
2012-04-16 08:27:32 -07:00
|
|
|
DESTINATION "lib/pkgconfig")
|