fix SystemC lib handling in build system

This commit is contained in:
Eyck Jentzsch 2021-07-27 12:25:31 +02:00
parent 5ef5d57d30
commit da819d8890
1 changed files with 33 additions and 28 deletions

View File

@ -61,7 +61,6 @@ elseif(TARGET elfio::elfio)
else() else()
message(FATAL_ERROR "No elfio library found, maybe a find_package() call is missing") message(FATAL_ERROR "No elfio library found, maybe a find_package() call is missing")
endif() endif()
#target_link_libraries(${PROJECT_NAME} PUBLIC ${Boost_program_options_LIBRARY} ${Boost_system_LIBRARY} ${Boost_thread_LIBRARY} ${Boost_filesystem_LIBRARY} )
set_target_properties(${PROJECT_NAME} PROPERTIES set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${PROJECT_VERSION} VERSION ${PROJECT_VERSION}
FRAMEWORK FALSE FRAMEWORK FALSE
@ -86,6 +85,12 @@ if(SystemC_FOUND)
if(WITH_LLVM) if(WITH_LLVM)
target_link_libraries(${PROJECT_NAME}_sc PUBLIC ${llvm_libs}) target_link_libraries(${PROJECT_NAME}_sc PUBLIC ${llvm_libs})
endif() endif()
if(SystemC_INCLUDE_DIRS)
target_include_directories (${PROJECT_NAME} PUBLIC ${SystemC_INCLUDE_DIRS})
target_link_directories(${PROJECT_NAME} PUBLIC ${SystemC_LIBRARY_DIRS})
endif()
target_link_libraries(${PROJECT_NAME} PUBLIC ${SystemC_LIBRARIES} )
set_target_properties(${PROJECT_NAME}_sc PROPERTIES set_target_properties(${PROJECT_NAME}_sc PROPERTIES
VERSION ${PROJECT_VERSION} VERSION ${PROJECT_VERSION}
FRAMEWORK FALSE FRAMEWORK FALSE