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

This reverts commit 029b15da25.

PkgConfigCommon added.
This commit is contained in:
Kolan Sh 2015-10-11 12:57:13 +03:00
parent e294fa055e
commit 82708ba514
2 changed files with 29 additions and 1 deletions

28
PkgConfigCommon.cmake Normal file
View File

@ -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"
)

View File

@ -23,7 +23,7 @@ SET_TARGET_PROPERTIES (${LibName} PROPERTIES VERSION ${MAJOR}.${MINOR}.${PATCH})
SET_TARGET_PROPERTIES (${LibName} PROPERTIES SOVERSION ${MAJOR}) SET_TARGET_PROPERTIES (${LibName} PROPERTIES SOVERSION ${MAJOR})
IF (WIN32) IF (WIN32)
SET_TARGET_PROPERTIES (${LibName} PROPERTIES PREFIX "" IMPORT_PREFIX "" 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) ENDIF (WIN32)
IF (LibInstall) IF (LibInstall)