CMakeLists.txt 1.22 KB
Newer Older
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
cmake_minimum_required(VERSION 3.12.0)

project(cameo
  VERSION 1.0.2
  LANGUAGES C 
  HOMEPAGE_URL "https://code.ill.fr/cameo/cameo"
  )

option(CAMEO_API_CPP "Compile and install cameo C++ api" OFF)
option(CAMEO_API_PYTHON "Compile and install cameo Python api" OFF)

if(${CAMEO_API_CPP})
  list(APPEND APIs cameo-api-cpp)
endif()
if(${CAMEO_API_PYTHON})
  list(APPEND APIs cameo-api-cpp)
  mark_as_advanced(CAMEO_API_CPP)
  list(APPEND APIs cameo-api-python)
endif()

#------------------------------------------------------------
# This is a trick: for the subprojects metioned here,
# the find_package does nothing, since the targets will be defined
# by the add_subdirectory command
set(as_subproject cameo-api-cpp-static)
macro(find_package)
  if(NOT "${ARGV0}" IN_LIST as_subproject)
    _find_package(${ARGV})
  endif()
endmacro()


#dependencies
34
35
36
#foreach(package cameo-com-jzmq  )
#  add_subdirectory(cameo-com/${package})
#endforeach()
37
38
39
40
41
42
43
44
45
46
47
48


foreach(package  cameo-server-jzmq cameo-console-jzmq
    ${APIs})
  add_subdirectory(${package})
endforeach()


# common CPack configuration
#include(${CMAKE_SOURCE_DIR}/CPackConfigCommon.in)
#set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/packaging/CPackConfig.cmake)
#include(CPack)