Revert "Fix win32 soname to make it identical to UNIX-like systems."

This reverts commit 029b15da25.

PkgConfigCommon added.
master
Kolan Sh 7 years ago
parent e294fa055e
commit 82708ba514
  1. 28
      PkgConfigCommon.cmake
  2. 2
      ValaLibCommonRules.cmake

@ -0,0 +1,28 @@
IF (WIN32)
SET (PkgConfigPrefix "")
ELSE (WIN32)
SET (PkgConfigPrefix ${CMAKE_INSTALL_PREFIX})
ENDIF (WIN32)
SET (PkgConfigExecPrefix "\${prefix}")
SET (PkgConfigLibDir "\${exec_prefix}/lib")
SET (PkgConfigIncludeDir "\${prefix}/include")
SET (PkgConfigName "${CMAKE_PROJECT_NAME}")
SET (PkgConfigDescription "${PROJECT_DESCRIPTION}")
SET (PkgConfigVersion "${MAJOR}.${MINOR}.${PATCH}")
SET (PkgConfigLibs "-L\${libdir}")
IF (WIN32)
SET (PkgConfigLibs "${PkgConfigLibs} -l${PROJECT_LOWERCASE_NAME}-${MAJOR}")
ELSE (WIN32)
SET (PkgConfigLibs "${PkgConfigLibs} -l${PROJECT_LOWERCASE_NAME}.so.${MAJOR}")
ENDIF (WIN32)
SET (PkgConfigLibsPrivate "")
SET (PkgConfigCflags "")
CONFIGURE_FILE (
"${CMAKE_CURRENT_SOURCE_DIR}/pkg-config.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_LOWERCASE_NAME}-${MAJOR}.pc"
)

@ -23,7 +23,7 @@ SET_TARGET_PROPERTIES (${LibName} PROPERTIES VERSION ${MAJOR}.${MINOR}.${PATCH})
SET_TARGET_PROPERTIES (${LibName} PROPERTIES SOVERSION ${MAJOR})
IF (WIN32)
SET_TARGET_PROPERTIES (${LibName} PROPERTIES PREFIX "" IMPORT_PREFIX ""
SUFFIX ".so.${MAJOR}.dll" IMPORT_SUFFIX ".so.${MAJOR}.a")
SUFFIX "-${MAJOR}.dll" IMPORT_SUFFIX "-${MAJOR}.a")
ENDIF (WIN32)
IF (LibInstall)

Loading…
Cancel
Save