Skip to content

Commit

Permalink
fix library name for cmake build (strukturag#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Nov 20, 2022
1 parent 3673889 commit 29698db
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions dec265/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add_executable (dec265 dec265.cc)

target_link_libraries (dec265 PRIVATE ${PROJECT_NAME})
target_link_libraries (dec265 PRIVATE de265)

if(SDL_FOUND)
target_sources(dec265 PRIVATE sdl.cc)
Expand All @@ -22,7 +22,7 @@ if(NOT MSVC)
# hdrcopy uses internal APIs that are not available when compiled for Windows
add_executable (hdrcopy hdrcopy.cc)

target_link_libraries (hdrcopy PRIVATE ${PROJECT_NAME})
target_link_libraries (hdrcopy PRIVATE de265)

install (TARGETS hdrcopy DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
2 changes: 1 addition & 1 deletion enc265/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ if(MSVC)
)
endif()

target_link_libraries (enc265 PRIVATE ${PROJECT_NAME})
target_link_libraries (enc265 PRIVATE de265)

install (TARGETS enc265 DESTINATION ${CMAKE_INSTALL_BINDIR})
18 changes: 9 additions & 9 deletions libde265/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,21 @@ if(NOT DISABLE_SSE)
endif()
endif()

add_library(${PROJECT_NAME} ${libde265_sources} ${ENCODER_OBJECTS} ${X86_OBJECTS})
target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads)
add_library(de265 ${libde265_sources} ${ENCODER_OBJECTS} ${X86_OBJECTS})
target_link_libraries(de265 PRIVATE Threads::Threads)

write_basic_package_version_file(${PROJECT_NAME}ConfigVersion.cmake COMPATIBILITY ExactVersion)
write_basic_package_version_file(libde265ConfigVersion.cmake COMPATIBILITY ExactVersion)

install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Config
install(TARGETS de265 EXPORT libde265Config
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

install(FILES ${libde265_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/de265-version.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
install(FILES ${libde265_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libde265)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/de265-version.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libde265)

install(EXPORT ${PROJECT_NAME}Config DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
install(EXPORT libde265Config DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libde265")

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake DESTINATION
"${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libde265ConfigVersion.cmake DESTINATION
"${CMAKE_INSTALL_LIBDIR}/cmake/libde265")

0 comments on commit 29698db

Please sign in to comment.