62 lines
1.3 KiB
CMake
62 lines
1.3 KiB
CMake
|
|
set(HEADERS
|
|
Archives.h
|
|
Array.h
|
|
Collection.h
|
|
DataAllocator.h
|
|
Debug.h
|
|
Export.h
|
|
Function.h
|
|
Macros.h
|
|
Mpl.h
|
|
Object.h
|
|
Options.h
|
|
Serializable.h
|
|
Signal.h
|
|
Singleton.h
|
|
SmartPointer.h
|
|
StaticInterface.h
|
|
StringReader.h
|
|
Types.h
|
|
Uuid.h
|
|
Vector.h
|
|
)
|
|
|
|
set(SOURCES
|
|
Archives.cpp
|
|
Debug.cpp
|
|
Object.cpp
|
|
Options.cpp
|
|
Serializable.cpp
|
|
Signal.cpp
|
|
Uuid.cpp
|
|
)
|
|
|
|
set(LIBRARIES Boost::program_options Boost::serialization)
|
|
|
|
set(libname ${PACKAGE_LIBPREFIX}Core)
|
|
set(ULIB_SHARED_LIBRARIES ${ULIB_SHARED_LIBRARIES} ${libname} PARENT_SCOPE)
|
|
set(ULIB_SELECTED_MODULES ${ULIB_SELECTED_MODULES} Core PARENT_SCOPE)
|
|
|
|
add_library(${libname} SHARED ${SOURCES})
|
|
set_target_properties(${libname} PROPERTIES
|
|
VERSION ${PROJECT_VERSION}
|
|
SOVERSION ${PROJECT_SOVERSION})
|
|
if(USE_CUDA)
|
|
set(LIBRARIES ${LIBRARIES} CUDA::cudart)
|
|
endif()
|
|
|
|
target_link_libraries(${libname} ${LIBRARIES})
|
|
|
|
install(TARGETS ${libname}
|
|
EXPORT "uLibTargets"
|
|
RUNTIME DESTINATION ${INSTALL_BIN_DIR} COMPONENT bin
|
|
LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT lib)
|
|
|
|
install(FILES ${HEADERS} DESTINATION ${INSTALL_INC_DIR}/Core)
|
|
|
|
if(BUILD_TESTING)
|
|
include(uLibTargetMacros)
|
|
add_subdirectory(testing)
|
|
endif()
|