Skip to content

Commit

Permalink
fix FindCereal.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Aug 28, 2024
1 parent 72d5329 commit 9dd4d31
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions cmake/FindCereal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ else (Cereal_LIBRARIES AND Cereal_INCLUDE_DIRS)

# build cereal before we search for required Cereal plugin libs below
execute_process(
COMMAND scons -j8 --minimal
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/3rdparty/cereal
COMMAND scons -j8 --minimal -u
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/3rdparty/openpilot/cereal
)

execute_process(
COMMAND scons -j8 --minimal -u
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/3rdparty/openpilot/msgq
)

find_path(Cereal_INCLUDE_DIRS
Expand All @@ -29,14 +34,21 @@ else (Cereal_LIBRARIES AND Cereal_INCLUDE_DIRS)
NAMES
cereal
PATHS
${CMAKE_SOURCE_DIR}/3rdparty/cereal
${CMAKE_SOURCE_DIR}/3rdparty/openpilot/cereal
)

find_library(Cereal_LIBRARY_COMMON
NAMES
common
PATHS
${CMAKE_SOURCE_DIR}/3rdparty/openpilot/common
)

find_library(Cereal_LIBRARY_MESSAGING
find_library(Cereal_LIBRARY_MSGQ
NAMES
messaging
msgq
PATHS
${CMAKE_SOURCE_DIR}/3rdparty/cereal
${CMAKE_SOURCE_DIR}/3rdparty/openpilot/msgq_repo
)

find_library(Cereal_LIBRARY_ZMQ
Expand All @@ -47,7 +59,8 @@ else (Cereal_LIBRARIES AND Cereal_INCLUDE_DIRS)
set(Cereal_LIBRARIES
${Cereal_LIBRARIES}
${Cereal_LIBRARY_CEREAL}
${Cereal_LIBRARY_MESSAGING}
${Cereal_LIBRARY_COMMON}
${Cereal_LIBRARY_MSGQ}
${Cereal_LIBRARY_ZMQ}
)

Expand Down

0 comments on commit 9dd4d31

Please sign in to comment.