783892b
--- CMakeLists.txt.fix_libpaths	2021-05-24 21:00:30.000000000 +0200
783892b
+++ CMakeLists.txt	2021-06-02 18:44:48.679744434 +0200
b42e5c7
@@ -485,14 +485,14 @@
783892b
 
783892b
     if (APPLE_BUILD)
783892b
         set_target_properties(smoldyn_shared PROPERTIES LINK_FLAGS "-framework Glut -framework OpenGL")
783892b
-    elseif (WINDOWS_BUILD)
783892b
-        set_target_properties(smoldyn_shared PROPERTIES PREFIX "lib")
783892b
+    elseif (UNIX)
783892b
+        set_target_properties(smoldyn_shared PROPERTIES PREFIX "lib" SOVERSION "${SMOLDYN_VERSION_MAJOR}" VERSION "${SMOLDYN_VERSION}")
783892b
     endif ()
783892b
 endif ()
783892b
 
783892b
 if (OPTION_TARGET_SMOLDYN)
783892b
     add_executable(smoldyn ${MAIN_FILES})
783892b
-    target_link_libraries(smoldyn PUBLIC smoldyn_static)
783892b
+    target_link_libraries(smoldyn PUBLIC smoldyn_shared)
783892b
     target_link_libraries(smoldyn PUBLIC ${DEP_LIBS})
783892b
 endif ()
783892b
 
783892b
@@ -470,11 +470,9 @@
783892b
     endif()
783892b
 
783892b
     if (OPTION_TARGET_LIBSMOLDYN)
783892b
-        install(TARGETS smoldyn_shared LIBRARY DESTINATION lib)
783892b
-        install(TARGETS smoldyn_static ARCHIVE DESTINATION lib)
783892b
-        install(FILES source/Smoldyn/libsmoldyn.h source/Smoldyn/smoldyn.h
783892b
-            ${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h
783892b
-            DESTINATION include)
783892b
+        install(TARGETS smoldyn_shared LIBRARY DESTINATION lib${LIB_SUFFIX})
783892b
+        install(TARGETS smoldyn_static ARCHIVE DESTINATION lib${LIB_SUFFIX})
783892b
+        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/../source/Smoldyn/libsmoldyn.h ${CMAKE_CURRENT_BINARY_DIR}/../source/Smoldyn/smoldyn.h ${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h DESTINATION include/smoldyn)
783892b
     endif ()
783892b
 endif ()
783892b