diff --git a/DRAMSys/library/CMakeLists.txt b/DRAMSys/library/CMakeLists.txt index e33fd633..30b76609 100644 --- a/DRAMSys/library/CMakeLists.txt +++ b/DRAMSys/library/CMakeLists.txt @@ -48,12 +48,12 @@ add_subdirectory(src/common/third_party/sqlite-amalgamation) add_subdirectory(src/common/third_party/DRAMPower) # Add SystemC: -if(DEFINED ENV{DRAMSYS_PCT}) - find_library(SYSTEMC_LIBRARY vsi_systemc_dynamic PATH "/software/Synopsys_CoWare/N-2017.12/VPProducts/SLS/linux/common/libso-gcc-5.2.0-64") - message("Building with PCT SystemC") -elseif(DEFINED ENV{SYSTEMC_HOME} AND DEFINED ENV{SYSTEMC_TARGET_ARCH}) - find_library(SYSTEMC_LIBRARY systemc PATH $ENV{SYSTEMC_HOME}/lib-$ENV{SYSTEMC_TARGET_ARCH}/) - message("Building with existing SystemC") +if(DEFINED ENV{SYSTEMC_HOME}) + find_library(SYSTEMC_LIBRARY + NAMES systemc vsi_systemc_dynamic + PATHS $ENV{SYSTEMC_HOME}/lib-$ENV{SYSTEMC_TARGET_ARCH}/ $ENV{SYSTEMC_HOME}/lib-linux64/ $ENV{SYSTEMC_HOME}/libso-gcc-5.2.0-64/ + ) + message("Building with external SystemC") else() set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libs") add_subdirectory(src/common/third_party/systemc) @@ -178,21 +178,12 @@ add_library(DRAMSysLibrary # Build: target_include_directories(DRAMSysLibrary - PUBLIC src/common/third_party/DRAMPower/src + PUBLIC src/common/third_party/DRAMPower/src/ PUBLIC src/common/third_party/sqlite-amalgamation/ + PUBLIC $ENV{SYSTEMC_HOME}/include/ + PUBLIC $ENV{SYSTEMC_HOME}/include/tlm/ ) -if(DEFINED ENV{DRAMSYS_PCT}) - target_include_directories(DRAMSysLibrary - PUBLIC /software/Synopsys_CoWare/N-2017.12/VPProducts/SLS/linux/common/include - PUBLIC /software/Synopsys_CoWare/N-2017.12/VPProducts/SLS/linux/common/include/tlm - ) -elseif(DEFINED ENV{SYSTEMC_HOME} AND DEFINED ENV{SYSTEMC_TARGET_ARCH}) - target_include_directories(DRAMSysLibrary - PUBLIC $ENV{SYSTEMC_HOME}/include - ) -endif() - target_link_libraries(DRAMSysLibrary ${SYSTEMC_LIBRARY} sqlite3::sqlite3