mirror of https://github.com/davisking/dlib.git
Updated cmake file so the compiled python API file has the correct extension.
This commit is contained in:
parent
27b479d79f
commit
97c55972d7
|
@ -61,13 +61,20 @@ include(${dlib_path}/cmake)
|
||||||
macro(add_python_module module_name module_sources )
|
macro(add_python_module module_name module_sources )
|
||||||
ADD_LIBRARY(${module_name}_ SHARED ${module_sources} ${ARGN} )
|
ADD_LIBRARY(${module_name}_ SHARED ${module_sources} ${ARGN} )
|
||||||
TARGET_LINK_LIBRARIES(${module_name}_ ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} dlib)
|
TARGET_LINK_LIBRARIES(${module_name}_ ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} dlib)
|
||||||
if(WIN32)
|
if(WIN32 AND NOT CYGWIN)
|
||||||
SET_TARGET_PROPERTIES( ${module_name}_
|
SET_TARGET_PROPERTIES( ${module_name}_
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
SUFFIX ".pyd"
|
SUFFIX ".pyd"
|
||||||
OUTPUT_NAME ${module_name}
|
OUTPUT_NAME ${module_name}
|
||||||
)
|
)
|
||||||
|
elseif(CYGWIN)
|
||||||
|
SET_TARGET_PROPERTIES( ${module_name}_
|
||||||
|
PROPERTIES
|
||||||
|
PREFIX ""
|
||||||
|
SUFFIX ".dll"
|
||||||
|
OUTPUT_NAME ${module_name}
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
SET_TARGET_PROPERTIES( ${module_name}_
|
SET_TARGET_PROPERTIES( ${module_name}_
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
|
|
Loading…
Reference in New Issue