Skip to content
Snippets Groups Projects
Commit 9d34c3ba authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

CMake fix for python search in Windows

parent 21441387
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@
namespace BornAgain {
const int major_version_number = 0;
const int minor_version_number = 9;
const int patch_version_number = 2;
const int patch_version_number = 3;
inline int GetMajorVersionNumber() { return major_version_number; }
inline int GetMinorVersionNumber() { return minor_version_number; }
......
......@@ -38,7 +38,7 @@ PROJECT_NAME = "BornAgain"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 0.9.2
PROJECT_NUMBER = 0.9.3
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
......
......@@ -77,13 +77,16 @@ if(BORNAGAIN_PYTHON OR BORNAGAIN_GUI)
# message(SEND_ERROR "No python libraries have been found")
#endif()
GET_FILENAME_COMPONENT(PyLibExtension ${PYTHON_LIBRARIES} EXT)
if(${PyLibExtension} STREQUAL ".a")
find_package( Threads )
set(syslibs "-lm -ldl -lutil ${CMAKE_THREAD_LIBS_INIT} -rdynamic")
message(STATUS "--> Static python library detected, adding ${syslibs}")
set(PYTHON_LIBRARIES "${syslibs} ${PYTHON_LIBRARIES}")
if(NOT WIN32)
GET_FILENAME_COMPONENT(PyLibExtension ${PYTHON_LIBRARIES} EXT)
if(${PyLibExtension} STREQUAL ".a")
find_package( Threads )
set(syslibs "-lm -ldl -lutil ${CMAKE_THREAD_LIBS_INIT} -rdynamic")
message(STATUS "--> Static python library detected, adding ${syslibs}")
set(PYTHON_LIBRARIES "${syslibs} ${PYTHON_LIBRARIES}")
endif()
endif()
#message(STATUS "--> Python libraries ${PYTHON_LIBRARIES}")
find_package(Numpy REQUIRED)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment