CMakeLists.txt now exports the EPICS shared libraries, no need to link them again in dependend drivers
CI / build-and-test (push) Successful in 12s
CI / build-and-test (push) Successful in 12s
This commit is contained in:
+11
-6
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(m_epics_ca)
|
||||
|
||||
# If the target already exists in a project (e.g. if m_epics_ca is included multiple time as a submodule of submodules),
|
||||
@@ -7,6 +7,9 @@ if(TARGET m_epics_ca)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(CMAKE_PREFIX_PATH "$ENV{MIDASSYS}")
|
||||
find_package(Midas REQUIRED)
|
||||
|
||||
add_compile_options(
|
||||
-Wall
|
||||
-Wformat=2
|
||||
@@ -37,14 +40,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES Linux)
|
||||
set(LIBS ${LIBS} -lpthread -lutil -lrt -lbsd -ldl)
|
||||
endif()
|
||||
|
||||
# Add the MIDAS libs
|
||||
set(LIBS
|
||||
${LIBS}
|
||||
${EPICSSYS}/lib/$ENV{EPICS_HOST_ARCH}/libca.so
|
||||
${EPICSSYS}/lib/$ENV{EPICS_HOST_ARCH}/libCom.so # For alarm.h
|
||||
${MIDASSYS}/lib/libmfe.a
|
||||
${MIDASSYS}/lib/libmidas.a
|
||||
${MIDASSYS}/lib/libmscb.a
|
||||
)
|
||||
|
||||
################################################################################
|
||||
@@ -65,6 +64,13 @@ target_include_directories(m_epics_ca INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/bus>
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
m_epics_ca
|
||||
INTERFACE
|
||||
midas
|
||||
${LIBS}
|
||||
)
|
||||
|
||||
################################################################################
|
||||
## Test executable
|
||||
################################################################################
|
||||
@@ -108,7 +114,6 @@ if(BUILD_TESTS)
|
||||
target_link_libraries(
|
||||
m_epics_ca_test
|
||||
m_epics_ca
|
||||
${LIBS}
|
||||
)
|
||||
|
||||
add_test(NAME m_epics_ca_test
|
||||
|
||||
Reference in New Issue
Block a user