make library naming consistent
This commit is contained in:
parent
da819d8890
commit
4ddf50162c
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(dbt-core-tgc VERSION 1.0.0)
|
||||
project(dbt-rise-tgc VERSION 1.0.0)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
@ -67,39 +67,8 @@ set_target_properties(${PROJECT_NAME} PROPERTIES
|
|||
PUBLIC_HEADER "${LIB_HEADERS}" # specify the public headers
|
||||
)
|
||||
|
||||
include(FindSystemCPackage)
|
||||
if(SystemC_FOUND)
|
||||
add_library(${PROJECT_NAME}_sc src/sysc/core_complex.cpp)
|
||||
target_compile_definitions(${PROJECT_NAME}_sc PUBLIC WITH_SYSTEMC)
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE CORE_${CORE_NAME})
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/incl/iss/arch/tgc_b.h)
|
||||
target_compile_definitions(${PROJECT_NAME}_sc PRIVATE CORE_TGC_B)
|
||||
endif()
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/incl/iss/arch/tgc_c.h)
|
||||
target_compile_definitions(${PROJECT_NAME}_sc PRIVATE CORE_TGC_C)
|
||||
endif()
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/incl/iss/arch/tgc_d.h)
|
||||
target_compile_definitions(${PROJECT_NAME}_sc PRIVATE CORE_TGC_D)
|
||||
endif()
|
||||
target_link_libraries(${PROJECT_NAME}_sc PUBLIC ${PROJECT_NAME} scc)
|
||||
if(WITH_LLVM)
|
||||
target_link_libraries(${PROJECT_NAME}_sc PUBLIC ${llvm_libs})
|
||||
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
|
||||
VERSION ${PROJECT_VERSION}
|
||||
FRAMEWORK FALSE
|
||||
PUBLIC_HEADER "${LIB_HEADERS}" # specify the public headers
|
||||
)
|
||||
endif()
|
||||
|
||||
project(tgc-sim)
|
||||
find_package(Boost COMPONENTS program_options system thread filesystem REQUIRED)
|
||||
find_package(Boost COMPONENTS program_options thread REQUIRED)
|
||||
|
||||
add_executable(${PROJECT_NAME} src/main.cpp)
|
||||
# This sets the include directory for the reference project. This is the -I flag in gcc.
|
||||
|
@ -109,20 +78,19 @@ if(WITH_LLVM)
|
|||
target_link_libraries(${PROJECT_NAME} PUBLIC ${llvm_libs})
|
||||
endif()
|
||||
# Links the target exe against the libraries
|
||||
target_link_libraries(${PROJECT_NAME} dbt-core-tgc)
|
||||
target_link_libraries(${PROJECT_NAME} jsoncpp)
|
||||
target_link_libraries(${PROJECT_NAME} dbt-rise-tgc)
|
||||
#target_link_libraries(${PROJECT_NAME} jsoncpp)
|
||||
if(TARGET Boost::program_options)
|
||||
target_link_libraries(${PROJECT_NAME} Boost::program_options Boost::thread)
|
||||
else()
|
||||
target_link_libraries(${PROJECT_NAME} ${BOOST_program_options_LIBRARY} ${BOOST_thread_LIBRARY})
|
||||
endif()
|
||||
#target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES}) #${Boost_program_options_LIBRARY} ${Boost_system_LIBRARY} ${Boost_filesystem_LIBRARY} ${Boost_thread_LIBRARY} )
|
||||
target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS})
|
||||
if (Tcmalloc_FOUND)
|
||||
target_link_libraries(${PROJECT_NAME} ${Tcmalloc_LIBRARIES})
|
||||
endif(Tcmalloc_FOUND)
|
||||
|
||||
install(TARGETS dbt-core-tgc tgc-sim
|
||||
install(TARGETS dbt-rise-tgc tgc-sim
|
||||
EXPORT ${PROJECT_NAME}Targets # for downstream dependencies
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # static lib
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # binaries
|
||||
|
@ -131,3 +99,41 @@ install(TARGETS dbt-core-tgc tgc-sim
|
|||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} COMPONENT devel # headers for mac (note the different component -> different package)
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} # headers
|
||||
)
|
||||
|
||||
project(dbt-rise-tgc_sc VERSION 1.0.0)
|
||||
|
||||
include(FindSystemCPackage)
|
||||
if(SystemC_FOUND)
|
||||
add_library(${PROJECT_NAME} src/sysc/core_complex.cpp)
|
||||
target_compile_definitions(${PROJECT_NAME} PUBLIC WITH_SYSTEMC)
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE CORE_${CORE_NAME})
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/incl/iss/arch/tgc_b.h)
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE CORE_TGC_B)
|
||||
endif()
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/incl/iss/arch/tgc_c.h)
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE CORE_TGC_C)
|
||||
endif()
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/incl/iss/arch/tgc_d.h)
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE CORE_TGC_D)
|
||||
endif()
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC dbt-rise-tgc scc)
|
||||
if(WITH_LLVM)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC ${llvm_libs})
|
||||
endif()
|
||||
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
VERSION ${PROJECT_VERSION}
|
||||
FRAMEWORK FALSE
|
||||
PUBLIC_HEADER "${LIB_HEADERS}" # specify the public headers
|
||||
)
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
EXPORT ${PROJECT_NAME}Targets # for downstream dependencies
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # static lib
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # binaries
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # shared lib
|
||||
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # for mac
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} COMPONENT devel # headers for mac (note the different component -> different package)
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} # headers
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue