continue improving osx cmake build

This commit is contained in:
Thomas Fussell 2015-10-14 13:16:25 -04:00
parent 89b1aca602
commit c1b7d7d98c
14 changed files with 23 additions and 11 deletions

View File

@ -1,8 +0,0 @@
cmake_minimum_required(VERSION 2.8.9)
project(xlnt)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../../../lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../../../bin)
add_subdirectory(xlnt)
add_subdirectory(xlnt.test)

View File

View File

View File

@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.3.2)
project(xlnt)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../../../lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../../../lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../../../bin)
foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/../../../lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/../../../lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/../../../bin)
endforeach(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES)
add_subdirectory(xlnt)
add_subdirectory(xlnt.test)

View File

@ -7,4 +7,5 @@ include_directories(../../../third-party/pugixml/src)
FILE(GLOB SOURCES ../../../source/*.cpp)
FILE(GLOB DETAIL_SOURCES ../../../source/detail/*.cpp)
add_library(xlnt STATIC ${SOURCES} ${DETAIL_SOURCES} ../../../third-party/pugixml/src/pugixml.cpp ../../../third-party/miniz/miniz.c)
add_library(xlnt STATIC ${SOURCES} ${DETAIL_SOURCES} ../../../third-party/pugixml/src/pugixml.cpp ../../../third-party/miniz/miniz.c)

View File

@ -4,8 +4,8 @@ import os
import subprocess
os.chdir(os.path.dirname(os.path.abspath(__file__)))
if not os.path.isfile('bin/xlnt.test'):
subprocess.call('./build')
subprocess.call('./build')
if os.path.isdir('./bin') and os.path.isfile('./bin/xlnt.test'):
os.chdir('./bin')
subprocess.call(['./xlnt.test'])