]> granicus.if.org Git - graphviz/commitdiff
CMake: standardize on always specifying library paths in 'install' steps
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 2 Apr 2022 18:03:42 +0000 (11:03 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 5 Apr 2022 03:03:09 +0000 (20:03 -0700)
Given the differences in how Windows vs everything else treats library vs binary
paths, it seems clearer and less confusing to always specify `RUNTIME`,
`LIBRARY`, and `ARCHIVE` paths during `install` steps. This also avoids
accidentally installing libraries to incorrect paths if they are considered for
installation as dependents of a binary, though I do not know whether this
behavior ever occurs.

cmd/edgepaint/CMakeLists.txt
cmd/tools/CMakeLists.txt

index 4fe5637e58c0de33824a9c46f01600625e1b54e2..82398933f33efede470bcde0c3364ec62af94b27 100644 (file)
@@ -33,6 +33,8 @@ if(with_sfdp)
   install(
     TARGETS edgepaint
     RUNTIME DESTINATION ${BINARY_INSTALL_DIR}
+    LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}
+    ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}
   )
 
   if(GZIP)
index 8ec1212f8a3140da9c7366f2de97ef5a5a66ff9c..170835e8c9bcc9c8f603cd2243c2b94fa68461dd 100644 (file)
@@ -10,6 +10,8 @@ function(tool_defaults name)
   install(
     TARGETS ${name}
     RUNTIME DESTINATION ${BINARY_INSTALL_DIR}
+    LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}
+    ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}
   )
 
   if(GZIP)