Commit a016ee51 authored by Holger Witsch's avatar Holger Witsch

further work on the CI

parent 3aa55a48
Pipeline #11264 failed with stages
in 1 minute and 21 seconds
......@@ -13,10 +13,25 @@
#
#
include(GNUInstallDirs)
include(GenerateExportHeader)
# If conda build, always set lib dir to 'lib'
if($ENV{CONDA_BUILD})
set(CMAKE_INSTALL_LIBDIR "lib")
endif()
# Set lower / upper case project names
string(TOUPPER "${PROJECT_NAME}" PROJECT_NAME_UPPER)
string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
# Set targets export name (used by lima and dependencies)
set(TARGETS_EXPORT_NAME "${PROJECT_NAME_LOWER}-targets")
# the following worked without cmake-trace, but not with :-(
#execute_process(COMMAND
# bash "-c" ". /etc/os-release; echo $ID$VERSION_ID;" OUTPUT_VARIABLE OS OUTPUT_STRIP_TRAILING_WHITESPACE
#)
execute_process(COMMAND
bash "-c" ". /etc/os-release; echo $ID$VERSION_ID;" OUTPUT_VARIABLE OS OUTPUT_STRIP_TRAILING_WHITESPACE
)
#message("OS is ${OS}")
......@@ -40,7 +55,7 @@ set(CXXFLAGS_USER -g)
#include(cmake_tango.opt)
#
# Set default PATH
# Set default PATH
#
#set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin/${OS}") # from Pogo
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin") # missing OS variable
......@@ -50,7 +65,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
# Files for Fpga TANGO class
#
set(FPGA Fpga)
set(FPGA_INCLUDE ${CMAKE_SOURCE_DIR})
set(FPGA_INCLUDE ${CMAKE_SOURCE_DIR};/segfs/tango/release/${OS}/include/tango;/segfs/tango/release/${OS}/include;/usr/include)
set(FPGA_SRC ${FPGA}.cpp ${FPGA}Class.cpp ${FPGA}StateMachine.cpp ${FPGA}AcquisitionThread.cpp Numbat_Functions.c Sps/Src/sps.c)
......@@ -92,3 +107,13 @@ message("SERVER_SRC=${SERVER_SRC}")
add_executable(${SERVER_NAME} ${SERVER_SRC})
target_link_libraries(${SERVER_NAME} ${USER_LIBS} ${TANGO_LIBS})
## Installation
install(
TARGETS ${SERVER_NAME}
EXPORT "${TARGETS_EXPORT_NAME}"
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # import library
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # .so files are libraries
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # .dll files are binaries
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} # this does not actually install anything (but used by downstream projects)
)
......@@ -4,7 +4,6 @@
#include "FpgaAcquisitionThread.h"
#include "FpgaClass.h"
#include "Numbat.h"
#include <tango.h>
#include <iostream>
int kbhit_linux(void)
......
#!/bin/bash
# make the executable
cmake -Bbuild -H.
cmake -Bbuild
cmake -Bbuild .
cmake --build build --target install
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment