This is what I use for my own expat library:
#----- Use MSVC Naming conventions for Shared Libraries
IF (MINGW AND BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES( expat
PROPERTIES
IMPORT_SUFFIX ".lib"
IMPORT_PREFIX ""
PREFIX ""
)
ENDIF (MINGW AND BUILD_SHARED_LIBS)
So, under MinGW, dynamic libraries would be expat.lib
For your case you would want something like:
IF ( BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES( ${PythonCDM_NAME
PROPERTIES
IMPORT_SUFFIX ".pyd"
IMPORT_PREFIX ""
PREFIX ""
)
ENDIF (BUILD_SHARED_LIBS)
I _think_ that is what you want. I am still "new" to windows dll
stuff so I may be off base a bit but you get the idea where to look.
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
On Jul 10, 2008, at 5:32 PM, Georgios Petasis wrote:
Hi all,
I am trying to compile a python module with cmake. Unfortunately,
in python 2.5.2 they have decided that
C modules will use the extension .pyd, instead of .dll under
windows. So, I have to somehow rename
a dll during installation. I currenlty have code like:
INSTALL ( TARGETS ${PythonCDM_NAME_V}
RUNTIME DESTINATION
${PKG_HOME_DIR}/CDM/Python/${CMAKE_SYSTEM_NAME}/$
{PKG_OS_ARCH}
LIBRARY DESTINATION
${PKG_HOME_DIR}/CDM/Python/${CMAKE_SYSTEM_NAME}/$
{PKG_OS_ARCH} )
as I don't want .lib to be installed. Is there a way I can rename
the dll to have a .pyd extension?
George
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake