@@ -81,7 +81,7 @@ find_package(PDA)
8181# Module, library and executable definition
8282####################################
8383
84- set (SRCS
84+ add_library (ReadoutCard SHARED
8585 #src/CardConfigurator.cxx
8686 src/CardType.cxx
8787 src/Factory/ChannelFactory.cxx
@@ -106,13 +106,11 @@ set(SRCS
106106 src/Utilities/Hugetlbfs.cxx
107107 src/Utilities/MemoryMaps.cxx
108108 src/Utilities/Numa.cxx
109- src/CommandLineUtilities/Common.cxx
110- src/CommandLineUtilities/Options .cxx
111109)
112110
113111# Add sources requiring PDA
114112if (PDA_FOUND)
115- list ( APPEND SRCS
113+ target_sources (ReadoutCard PRIVATE
116114 src/DmaChannelPdaBase.cxx
117115 src/BarInterfaceBase.cxx
118116 src/CardConfigurator.cxx
@@ -135,8 +133,6 @@ if(PDA_FOUND)
135133 )
136134endif ()
137135
138- # Create library
139- add_library (ReadoutCard SHARED ${SRCS} )
140136target_include_directories (ReadoutCard
141137 PUBLIC
142138 $<INSTALL_INTERFACE:include >
@@ -232,7 +228,7 @@ math(EXPR count "${count}-1")
232228foreach (i RANGE ${count} )
233229 list (GET EXE_SRCS ${i} src)
234230 list (GET EXE_NAMES ${i} name )
235- add_executable (${name} src/CommandLineUtilities/${src} )
231+ add_executable (${name} src/CommandLineUtilities/${src} src/CommandLineUtilities/ Options .cxx src/CommandLineUtilities/Common.cxx )
236232 target_include_directories (${name}
237233 PRIVATE
238234 ${CMAKE_CURRENT_SOURCE_DIR} /src
@@ -273,7 +269,7 @@ foreach (test ${TEST_SRCS})
273269 get_filename_component (test_name ${test} NAME )
274270 string (REGEX REPLACE ".cxx" "" test_name ${test_name} )
275271
276- add_executable (${test_name} ${test} )
272+ add_executable (${test_name} ${test} src/CommandLineUtilities/ Options .cxx )
277273 target_include_directories (${test_name}
278274 PRIVATE
279275 ${CMAKE_CURRENT_SOURCE_DIR} /src
0 commit comments