mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
fix trailing space preventing linux python extension build
This commit is contained in:
parent
fa179d58ab
commit
329fe488fe
@ -8,10 +8,10 @@ set(XLNT_ARROW
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/xlntarrow.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/xlntarrow.cpp)
|
||||
|
||||
link_directories(${ARROW_LIBRARY_PATH})
|
||||
add_library(xlntarrow SHARED ${XLNT_ARROW})
|
||||
target_compile_definitions(xlntarrow PRIVATE XLNT_EXPORT=1)
|
||||
target_link_libraries(xlntarrow PRIVATE xlnt)
|
||||
link_directories(${ARROW_LIBRARY_PATH})
|
||||
target_link_libraries(xlntarrow PRIVATE arrow)
|
||||
target_include_directories(xlntarrow PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_include_directories(xlntarrow PRIVATE ${ARROW_INCLUDE_PATH})
|
||||
|
@ -1,10 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
project(xlntpyarrow)
|
||||
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
endif()
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/setup.py.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/setup.py")
|
||||
|
||||
|
||||
|
||||
add_custom_command(xlntpyarrow
|
||||
COMMAND python ${CMAKE_CURRENT_BINARY_DIR}/setup.py build_ext)
|
||||
COMMAND python setup.py build)
|
||||
|
@ -21,12 +21,19 @@ include_dirs = [
|
||||
conda_root
|
||||
]
|
||||
|
||||
subdirectory = ''
|
||||
|
||||
if os.name == 'nt':
|
||||
subdirectory = '/Release'
|
||||
|
||||
library_dirs = [
|
||||
os.path.join(project_root, 'build/arrow/xlntarrow/Debug'),
|
||||
os.path.join(project_root, 'build/source/Debug'),
|
||||
os.path.join(project_root, 'build/arrow/xlntarrow' + subdirectory),
|
||||
os.path.join(project_root, 'build/source' + subdirectory),
|
||||
os.path.join(conda_root, '../lib')
|
||||
]
|
||||
|
||||
compile_args = '${CMAKE_CXX_FLAGS}'.split() or []
|
||||
|
||||
xlntpyarrow_extension = Extension(
|
||||
'xlntpyarrow',
|
||||
['${CMAKE_CURRENT_SOURCE_DIR}/xlntpyarrow.cpp'],
|
||||
@ -38,7 +45,7 @@ xlntpyarrow_extension = Extension(
|
||||
'xlnt'
|
||||
],
|
||||
library_dirs = library_dirs,
|
||||
extra_compile_args=['${CMAKE_CXX_FLAGS}']
|
||||
extra_compile_args = compile_args
|
||||
)
|
||||
|
||||
classifiers = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user