Mercurial > hg > orthanc-python
comparison CMakeLists.txt @ 24:3bed39e4b85f
fix prefix and suffix for Windows Python libraries
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 03 Apr 2020 12:12:09 +0200 |
parents | 874a3fef26ff |
children | 3b59f5dd7e72 |
comparison
equal
deleted
inserted
replaced
23:874a3fef26ff | 24:3bed39e4b85f |
---|---|
24 message(FATAL_ERROR "Error in the (x.y) format of the Python version: ${PYTHON_VERSION}") | 24 message(FATAL_ERROR "Error in the (x.y) format of the Python version: ${PYTHON_VERSION}") |
25 endif() | 25 endif() |
26 | 26 |
27 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 27 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
28 if (MSVC) | 28 if (MSVC) |
29 set(Prefix "") | |
29 set(Suffix ".lib") | 30 set(Suffix ".lib") |
30 else() | 31 else() |
32 set(Prefix "lib") | |
31 set(Suffix ".a") | 33 set(Suffix ".a") |
32 endif() | 34 endif() |
33 | 35 |
34 set(PYTHON_LIBRARY_NAME libpython${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.${Suffix}) | 36 set(PYTHON_LIBRARY_NAME ${Prefix}python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}${Suffix}) |
35 set(PYTHON_INCLUDE_DIRS ${PYTHON_WINDOWS_ROOT}/include) | 37 set(PYTHON_INCLUDE_DIRS ${PYTHON_WINDOWS_ROOT}/include) |
36 set(PYTHON_LIBRARIES ${PYTHON_WINDOWS_ROOT}/libs/${PYTHON_LIBRARY_NAME}) | 38 set(PYTHON_LIBRARIES ${PYTHON_WINDOWS_ROOT}/libs/${PYTHON_LIBRARY_NAME}) |
37 | 39 |
38 else() | 40 else() |
39 find_package(PkgConfig REQUIRED) | 41 find_package(PkgConfig REQUIRED) |