From d892ef14679e30c2c0424acc34d83e8f7b969ead Mon Sep 17 00:00:00 2001 From: Guilherme Amadio <amadio@cern.ch> Date: Fri, 28 Sep 2018 17:38:56 +0200 Subject: [PATCH] Update CMakeLists.txt for sql/oracle --- sql/oracle/CMakeLists.txt | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/sql/oracle/CMakeLists.txt b/sql/oracle/CMakeLists.txt index 073c7385a07..868cbdf652a 100644 --- a/sql/oracle/CMakeLists.txt +++ b/sql/oracle/CMakeLists.txt @@ -2,17 +2,36 @@ # CMakeLists.txt file for building ROOT sql/oracle package ############################################################################ -include_directories(${ORACLE_INCLUDE_DIR}) -add_definitions(${ORACLE_DEFINITIONS}) +ROOT_STANDARD_LIBRARY_PACKAGE(Oracle + HEADERS + TOracleResult.h + TOracleRow.h + TOracleServer.h + TOracleStatement.h + SOURCES + src/TOracleResult.cxx + src/TOracleRow.cxx + src/TOracleServer.cxx + src/TOracleStatement.cxx + DICTIONARY_OPTIONS + -I${ORACLE_INCLUDE_DIR} + DEPENDENCIES + Core + Net + RIO +) -# Check if libstdc++ uses the new string ABI and fall back to the old one if yes. -# We have to check for this because on the nightly builds we have an old occi -# installation that uses the old ABI, which results in linking errors. +# Fall back to old libstdc++ ABI if needed if(${GLIBCXX_USE_CXX11_ABI}) - file(GLOB srcs src/TOracle*.cxx) - set_source_files_properties(${srcs} PROPERTIES COMPILE_DEFINITIONS _GLIBCXX_USE_CXX11_ABI=0) + set_source_files_properties( + src/TOracleResult.cxx + src/TOracleRow.cxx + src/TOracleServer.cxx + src/TOracleStatement.cxx + PROPERTIES + COMPILE_DEFINITIONS _GLIBCXX_USE_CXX11_ABI=0) endif() -ROOT_STANDARD_LIBRARY_PACKAGE(Oracle - LIBRARIES ${ORACLE_LIBRARIES} - DEPENDENCIES Core Net RIO) +target_compile_definitions(Oracle PUBLIC ${ORACLE_DEFINITIONS}) +target_include_directories(Oracle PUBLIC ${ORACLE_INCLUDE_DIR}) +target_link_libraries(Oracle PUBLIC ${ORACLE_LIBRARIES}) -- GitLab