Commit e4cfd5b3 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

updating build to work better with spack

parent da7fa4a7
set (XACC_ROOT "@CMAKE_INSTALL_PREFIX@")
set (XACC_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include/cppmicroservices3;@CMAKE_INSTALL_PREFIX@/include/xacc;@CMAKE_INSTALL_PREFIX@/include/quantum/gate;@CMAKE_INSTALL_PREFIX@/include/quantum/aqc;@CMAKE_INSTALL_PREFIX@/include/spdlog")
set (XACC_LIBRARY_DIR "@CMAKE_INSTALL_PREFIX@/lib")
set (XACC_LIBRARIES "xacc;xacc-quantum-gate;xacc-quantum-aqc;CppMicroServicesd")
set(CppUsLib CppMicroServicesd)
link_directories("${XACC_LIBRARY_DIR}")
find_library(cppus_has_d_suffix CppMicroServicesd)
if (NOT cppus_has_d_suffix)
set (XACC_LIBRARIES "xacc;xacc-quantum-gate;xacc-quantum-aqc;CppMicroServicesd")
else()
set (XACC_LIBRARIES "xacc;xacc-quantum-gate;xacc-quantum-aqc;CppMicroServices")
endif()
......@@ -72,7 +72,13 @@ usFunctionEmbedResources(TARGET ${LIBRARY_NAME}
manifest.json
)
target_link_libraries(${LIBRARY_NAME} ${Boost_LIBRARIES} CppMicroServices)
set(CppUsLib CppMicroServicesd)
link_directories(${CPPUS_LIBRARY_DIR})
find_library(cppus_has_d_suffix CppMicroServicesd)
if (NOT cppus_has_d_suffix)
set(CppUsLib CppMicroServices)
endif()
target_link_libraries(${LIBRARY_NAME} ${Boost_LIBRARIES} ${CppUsLib})
add_subdirectory(ir)
add_subdirectory(compiler)
......
......@@ -73,7 +73,13 @@ usFunctionEmbedResources(TARGET ${LIBRARY_NAME}
manifest.json
)
target_link_libraries(${LIBRARY_NAME} ${Boost_LIBRARIES} CppMicroServices)
set(CppUsLib CppMicroServicesd)
link_directories(${CPPUS_LIBRARY_DIR})
find_library(cppus_has_d_suffix CppMicroServicesd)
if (NOT cppus_has_d_suffix)
set(CppUsLib CppMicroServices)
endif()
target_link_libraries(${LIBRARY_NAME} ${Boost_LIBRARIES} ${CppUsLib})
add_subdirectory(compiler)
add_subdirectory(ir)
......
......@@ -47,9 +47,14 @@ set (LIBRARY_NAME xacc)
file (GLOB HEADERS XACC.hpp ir/*.hpp program/*.hpp compiler/*.hpp accelerator/*.hpp utils/*.hpp)
file (GLOB SRC *.cpp utils/*.cpp)
set(CppUsLib CppMicroServicesd)
link_directories(${CPPUS_LIBRARY_DIR})
add_library(${LIBRARY_NAME} SHARED ${SRC})
target_link_libraries(${LIBRARY_NAME} ${Boost_LIBRARIES} CppMicroServicesd)
find_library(cppus_has_d_suffix CppMicroServicesd)
if (NOT cppus_has_d_suffix)
set(CppUsLib CppMicroServices)
endif()
target_link_libraries(${LIBRARY_NAME} ${Boost_LIBRARIES} ${CppUsLib})
# Get the test files
file(GLOB test_files utils/tests/*Tester.cpp)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment