From 22325a283659952e835b8bae3f114d84cd0f12b8 Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Wed, 5 Jul 2017 15:04:57 -0700 Subject: [PATCH] try to make windows and linux builds both work --- CMakeLists.txt | 4 ++-- arrow/xlntarrow/CMakeLists.txt | 3 ++- arrow/xlntpyarrow/CMakeLists.txt | 4 +++- include/xlnt/xlnt.hpp | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b065924..f5dc868c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,9 +35,9 @@ if(ARROW) option(ARROW_INCLUDE_PATH "Include path of Apache Arrow" "") option(ARROW_LIBRARY_PATH "Library path of Apache Arrow" "") if(NOT ARROW_INCLUDE_PATH) - message("Missing Apache Arrow include path.") + message(FATAL_ERROR "Missing Apache Arrow include path (-D ARROW_INCLUDE_PATH).") elseif(NOT ARROW_LIBRARY_PATH) - message("Missing Apache Arrow library path.") + message(FATAL_ERROR "Missing Apache Arrow library path (-D ARROW_LIBRARY_PATH).") else() add_subdirectory(arrow/xlntarrow) add_subdirectory(arrow/xlntpyarrow) diff --git a/arrow/xlntarrow/CMakeLists.txt b/arrow/xlntarrow/CMakeLists.txt index 22bc2bd5..0b1e9f13 100644 --- a/arrow/xlntarrow/CMakeLists.txt +++ b/arrow/xlntarrow/CMakeLists.txt @@ -11,7 +11,8 @@ set(XLNT_ARROW add_library(xlntarrow SHARED ${XLNT_ARROW}) target_compile_definitions(xlntarrow PRIVATE XLNT_EXPORT=1) target_link_libraries(xlntarrow PRIVATE xlnt) -target_link_libraries(xlntarrow PRIVATE ${ARROW_LIBRARY_PATH}/arrow.lib) +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}) target_include_directories(xlntarrow PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../include) diff --git a/arrow/xlntpyarrow/CMakeLists.txt b/arrow/xlntpyarrow/CMakeLists.txt index a4ab3f16..fda091f0 100644 --- a/arrow/xlntpyarrow/CMakeLists.txt +++ b/arrow/xlntpyarrow/CMakeLists.txt @@ -4,5 +4,7 @@ project(xlntpyarrow) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/setup.py.cmake" "${CMAKE_CURRENT_BINARY_DIR}/setup.py") -add_custom_target(xlntpyarrow + + +add_custom_command(xlntpyarrow COMMAND python ${CMAKE_CURRENT_BINARY_DIR}/setup.py build_ext) diff --git a/include/xlnt/xlnt.hpp b/include/xlnt/xlnt.hpp index bf52609c..7a4daf31 100644 --- a/include/xlnt/xlnt.hpp +++ b/include/xlnt/xlnt.hpp @@ -66,6 +66,7 @@ #include #include #include +#include #include #include #include