Skip to content

Commit

Permalink
Merge pull request #716 from slaclab/ext_cmake_fix
Browse files Browse the repository at this point in the history
Fix cmake template for external builds
  • Loading branch information
slacrherbst authored Jul 23, 2020
2 parents 954996b + 551d597 commit f804f61
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions templates/RogueConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ if ( NOT NO_PYTHON )
endif()

set(Boost_USE_MULTITHREADED ON)
set(Boost_NO_BOOST_CMAKE ON)

# Hint for boost on anaconda
if (DEFINED ENV{CONDA_PREFIX})
Expand All @@ -56,12 +57,12 @@ if ( NOT NO_PYTHON )

# libboost_python3.7 style libraries
message("Looking for libboost_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
FIND_PACKAGE(Boost 1.58 QUIET COMPONENTS system thread python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
FIND_PACKAGE(Boost 1.58 QUIET COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})

# libboost_python3 style libraries
if (NOT Boost_FOUND)
message("Looking for libboost_python${PYTHON_VERSION_MAJOR}")
FIND_PACKAGE(Boost 1.58 QUIET COMPONENTS system thread python${PYTHON_VERSION_MAJOR})
FIND_PACKAGE(Boost 1.58 QUIET COMPONENTS python${PYTHON_VERSION_MAJOR})
endif()

# libboost_python style libraries
Expand All @@ -73,13 +74,13 @@ if ( NOT NO_PYTHON )
# libboost_python-py37 style libraries
if (NOT Boost_FOUND)
message("Looking for libboost_python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
FIND_PACKAGE(Boost 1.58 QUIET COMPONENTS system thread python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
FIND_PACKAGE(Boost 1.58 QUIET COMPONENTS python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
endif()

# libboost_python3-py37 style libraries
if (NOT Boost_FOUND)
message("Looking for libboost_python3-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
FIND_PACKAGE(Boost 1.58 QUIET COMPONENTS system thread python3-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
FIND_PACKAGE(Boost 1.58 QUIET COMPONENTS python3-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
endif()

# Nothing worked
Expand Down Expand Up @@ -189,6 +190,7 @@ if((NOT NO_PYTHON) AND (NOT NO_EPICS) AND DEFINED ENV{EPICS_BASE})
${EPICS_BASE_DIR}/lib/${EPICS_ARCH}/libca.so
${EPICS_BASE_DIR}/lib/${EPICS_ARCH}/libCom.so )
endif()

else()
set(DO_EPICS_V3 0)
endif()
Expand Down

0 comments on commit f804f61

Please sign in to comment.