mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-23 18:14:06 +00:00
[build] Rename the library to avoid naming it liblibuvg266
This commit is contained in:
parent
2016f30dc0
commit
08e11ccaa9
|
@ -63,9 +63,9 @@ endif()
|
|||
add_definitions(-DCOMPILE_INTEL)
|
||||
|
||||
if(USE_SHARED_LIB)
|
||||
add_library(libuvg266 SHARED ${LIB_SOURCES})
|
||||
add_library(uvg266 SHARED ${LIB_SOURCES})
|
||||
else()
|
||||
add_library(libuvg266 STATIC ${LIB_SOURCES})
|
||||
add_library(uvg266 STATIC ${LIB_SOURCES})
|
||||
endif()
|
||||
|
||||
target_include_directories(libuvg266 PUBLIC src)
|
||||
|
@ -84,8 +84,13 @@ endif()
|
|||
add_executable(uvg266 ${CLI_SOURCES})
|
||||
target_link_libraries(uvg266 PUBLIC libuvg266)
|
||||
|
||||
set_target_properties(uvg266-bin PROPERTIES OUTPUT_NAME uvg266)
|
||||
set_target_properties(uvg266-bin PROPERTIES RUNTIME_OUTPUT_NAME uvg266)
|
||||
|
||||
target_link_libraries(uvg266-bin PUBLIC uvg266)
|
||||
|
||||
if(MSVC)
|
||||
target_include_directories(libuvg266 PUBLIC src/threadwrapper/include)
|
||||
target_include_directories(uvg266 PUBLIC src/threadwrapper/include)
|
||||
set_property( SOURCE ${LIB_SOURCES_STRATEGIES_AVX2} APPEND PROPERTY COMPILE_FLAGS "/arch:AVX2" )
|
||||
else()
|
||||
set_property( SOURCE ${LIB_SOURCES_STRATEGIES_AVX2} APPEND PROPERTY COMPILE_FLAGS "-mavx2 -mbmi -mpopcnt -mlzcnt -mbmi2" )
|
||||
|
@ -101,7 +106,7 @@ else()
|
|||
set(EXTRA_LIBS ${EXTRA_LIBS} m)
|
||||
endif (HAVE_LIB_M)
|
||||
|
||||
target_link_libraries(uvg266 PUBLIC ${EXTRA_LIBS})
|
||||
target_link_libraries(uvg266-bin PUBLIC ${EXTRA_LIBS})
|
||||
endif()
|
||||
|
||||
# INSTALL
|
||||
|
@ -109,8 +114,8 @@ endif()
|
|||
# ToDo: make configurable
|
||||
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/src/uvg266.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pkgconfig)
|
||||
install(TARGETS uvg266 DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(TARGETS libuvg266 DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
install(TARGETS uvg266-bin DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(TARGETS uvg266 DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
if(USE_SHARED_LIB) # Just add the lib to the bin directory for now
|
||||
install(TARGETS libuvg266 DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
endif()
|
||||
|
@ -120,8 +125,14 @@ install(FILES ${PROJECT_SOURCE_DIR}/doc/uvg266.1 DESTINATION ${CMAKE_INSTALL_PRE
|
|||
# TESTS
|
||||
if(EXISTS "${PROJECT_SOURCE_DIR}/greatest/greatest.h")
|
||||
add_subdirectory( "tests/" )
|
||||
|
||||
#enable_testing()
|
||||
|
||||
add_test( NAME Test_uvg266 COMMAND uvg266_tests )
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED MSVC)
|
||||
add_custom_target(
|
||||
check
|
||||
COMMAND ${PROJECT_SOURCE_DIR}/tests/test_external_symbols.sh
|
||||
COMMENT "Building and running test..."
|
||||
VERBATIM
|
||||
)
|
||||
endif()
|
|
@ -37,5 +37,5 @@ endif()
|
|||
|
||||
add_definitions(-DCOMPILE_INTEL)
|
||||
|
||||
target_link_libraries(uvg266_tests PUBLIC libuvg266)
|
||||
target_link_libraries(uvg266_tests PUBLIC uvg266)
|
||||
|
||||
|
|
Loading…
Reference in a new issue