Skip to content

Commit

Permalink
cmake: use default DESTINATIONs in install(TARGETS)
Browse files Browse the repository at this point in the history
These were introduced in CMake v3.14, how convenient.
  • Loading branch information
DankRank committed Oct 24, 2024
1 parent 864b51a commit 0456787
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion thanm.old/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ add_executable(thanm.old
thanm.h image.h
)
target_link_libraries(thanm.old PRIVATE util $<$<BOOL:${PNG_FOUND}>:PNG::PNG> setargv thtk_warning)
install(TARGETS thanm.old DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS thanm.old)
install(FILES thanm.old.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
2 changes: 1 addition & 1 deletion thanm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ add_executable(thanm
)
target_include_directories(thanm PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(thanm PRIVATE util $<$<BOOL:${PNG_FOUND}>:PNG::PNG> math setargv thtk_warning)
install(TARGETS thanm DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS thanm)
install(FILES thanm.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
2 changes: 1 addition & 1 deletion thdat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include_directories(${CMAKE_SOURCE_DIR})
add_executable(thdat thdat.c)
target_link_libraries(thdat PRIVATE thtk util setargv thtk_warning $<$<BOOL:${OPENMP_FOUND}>:OpenMP::OpenMP_C>)
install(TARGETS thdat DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS thdat)
install(FILES thdat.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
2 changes: 1 addition & 1 deletion thecl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ add_executable(thecl
expr.c thecl.c eclmap.c thecl06.c thecl10.c
expr.h thecl.h eclmap.h)
target_link_libraries(thecl PRIVATE util math setargv thtk_warning)
install(TARGETS thecl DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS thecl)
install(FILES thecl.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
2 changes: 1 addition & 1 deletion thmsg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ add_executable(thmsg
thmsg.h
)
target_link_libraries(thmsg PRIVATE util setargv thtk_warning)
install(TARGETS thmsg DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS thmsg)
install(FILES thmsg.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
2 changes: 1 addition & 1 deletion thstd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ add_executable(thstd
thstd.h
)
target_link_libraries(thstd PRIVATE util setargv thtk_warning)
install(TARGETS thstd DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS thstd)
install(FILES thstd.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
6 changes: 1 addition & 5 deletions thtk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,4 @@ if (PKG_CONFIG_FOUND)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/thtk.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()
install(TARGETS thtk
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/thtk)
install(TARGETS thtk PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/thtk)

0 comments on commit 0456787

Please sign in to comment.