-
Dmitry Romanov authoredDmitry Romanov authored
CMakeLists.txt 1.43 KiB
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
PROJECT(necal
VERSION 0.0.1
LANGUAGES CXX
DESCRIPTION "Athena@IP6"
)
# Set find package policy to new
cmake_policy(SET CMP0074 NEW)
# Do we have athena directory (has submodules been initialized?)
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/athena")
message(FATAL_ERROR "ERROR. Can't fine 'athena' directory. Did you initialize git submodules? If not run 'git submodule init && git submodule update'. CMake exiting..." )
endif()
# Same for ip6 directory
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/ip6")
message(FATAL_ERROR "ERROR. Can't fine 'ip6' directory. Did you initialize git submodules? If not run 'git submodule init && git submodule update'. CMake exiting..." )
endif()
set (ln_cmd "ln")
set (ln_arg "-s ../ip6/ip6 athena/ip6")
message(STATUS "ln cmd: ${ln_cmd}")
execute_process(COMMAND "ln -s ../ip6/ip6 ${PROJECT_SOURCE_DIR}/athena/ip6"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE git_result
OUTPUT_VARIABLE git_ver)
message(STATUS "{PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}")
# message(STATUS "${CMAKE_CURRENT_LIST_DIR}/athena/ip6")
# # We need to create a symbolic link for athena if
# if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/athena/ip6")
# execute_process(COMMAND "ln" "-s" "../ip6/ip6" "athena/ip6")
# message(STATUS "created ip6 sybmolic link in athena directory" )
# endif()
# Add athena and ip6 repos
add_subdirectory(athena)
add_subdirectory(ip6)