fix targets for make file
authorAlan Knowles <alan@roojs.com>
Fri, 17 May 2019 02:21:39 +0000 (10:21 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 17 May 2019 02:21:39 +0000 (10:21 +0800)
bin/CMakeLists.txt
roojspacker/CMakeLists.txt

index 90e7fa1..6fcf8e6 100644 (file)
@@ -47,7 +47,10 @@ target_link_libraries(${PROJECT_NAME}
 
 # Install the executable.
 install (TARGETS ${PROJECT_NAME}
-    RUNTIME DESTINATION bin ${CMAKE_INSTALL_BINDIR})
+    RUNTIME DESTINATION bin  # On Windows, the DLL goes in the same place as the executables
+    LIBRARY DESTINATION lib  # This is where shared libraries (*.so on Linux, *.dynlib on OS X)
+    ARCHIVE DESTINATION lib) # Finally, this is where static libraries (*.a) go
+
 
 # Generate a .gitignore
 file(WRITE  ".gitignore" "# Automatically generated by CMake, do not modify.\n")
@@ -59,4 +62,4 @@ endforeach(file)
 foreach(file ${ROOJSPACKER_MAIN_SOURCES})
   string(REPLACE "${CMAKE_CURRENT_BINARY_DIR}/" "" file ${file})
   file(APPEND ".gitignore" "/${file}\n")
-endforeach(file)
\ No newline at end of file
+endforeach(file)
index 682c126..405d203 100644 (file)
@@ -129,13 +129,17 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_PKG_NAME}.vapi
 # Install the library
 install (
     TARGETS ${ROOJSPACKER_LIBRARY_NAME}
-    RUNTIME DESTINATION bin  # On Windows, the DLL goes in the same place as the executables
-    LIBRARY DESTINATION lib  # This is where shared libraries (*.so on Linux, *.dynlib on OS X)
-    ARCHIVE DESTINATION lib) # Finally, this is where static libraries (*.a) go
+    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}  # On Windows, the DLL goes in the same place as the executables
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}  # This is where shared libraries (*.so on Linux, *.dynlib on OS X)
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) # Finally, this is where static libraries (*.a) go
 
 # Install the C header
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_PKG_NAME}.h
-    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/)
+#install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_PKG_NAME}.h
+#    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/)
+
+INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_PKG_NAME}.h
+       DESTINATION include)
+
 
 # Install our VAPI
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ROOJSPACKER_PKG_NAME}.vapi