Switched to find_package
This commit is contained in:
+6
-21
@@ -17,6 +17,9 @@ option(
|
||||
OFF
|
||||
)
|
||||
|
||||
set(CMAKE_PREFIX_PATH "$ENV{MIDASSYS}")
|
||||
find_package(Midas REQUIRED)
|
||||
|
||||
set(
|
||||
DRIVERS
|
||||
$ENV{MIDASSYS}/drivers/bus/null.cxx
|
||||
@@ -31,8 +34,9 @@ set(SYS_LIBS
|
||||
)
|
||||
|
||||
set(MIDAS_LIBS
|
||||
midas
|
||||
mscb
|
||||
midas::mfe
|
||||
midas::midas
|
||||
midas::mscb
|
||||
)
|
||||
|
||||
set(LIBS ${SYS_LIBS} ${MIDAS_LIBS})
|
||||
@@ -58,18 +62,6 @@ target_include_directories(
|
||||
hvr401
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PRIVATE
|
||||
$ENV{MIDASSYS}/drivers
|
||||
$ENV{MIDASSYS}/include
|
||||
# This is redundant if MIDASSYS =/ Midas repo, but needed if MIDAS has been
|
||||
# installed in the repo directory, since the CMake file of MIDAS doesn't
|
||||
# copy the headers into $ENV{MIDASSYS}/include in the latter case.
|
||||
$ENV{MIDASSYS}/include/mscb
|
||||
)
|
||||
|
||||
target_link_directories(
|
||||
hvr401
|
||||
PUBLIC $ENV{MIDASSYS}/lib
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
@@ -100,18 +92,11 @@ if(${BUILD_FRONTEND})
|
||||
hvr401_fe
|
||||
PRIVATE
|
||||
$ENV{MIDASSYS}/drivers
|
||||
$ENV{MIDASSYS}/include
|
||||
)
|
||||
|
||||
target_link_directories(
|
||||
hvr401_fe
|
||||
PUBLIC $ENV{MIDASSYS}/lib
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
hvr401_fe
|
||||
hvr401
|
||||
mfe
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user