mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
continue improving osx cmake build
This commit is contained in:
parent
89b1aca602
commit
c1b7d7d98c
|
@ -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)
|
|
19
build/cmake/CMakeLists.txt
Normal file
19
build/cmake/CMakeLists.txt
Normal 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)
|
|
@ -7,4 +7,5 @@ include_directories(../../../third-party/pugixml/src)
|
||||||
|
|
||||||
FILE(GLOB SOURCES ../../../source/*.cpp)
|
FILE(GLOB SOURCES ../../../source/*.cpp)
|
||||||
FILE(GLOB DETAIL_SOURCES ../../../source/detail/*.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)
|
||||||
|
|
|
@ -4,8 +4,8 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
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'):
|
if os.path.isdir('./bin') and os.path.isfile('./bin/xlnt.test'):
|
||||||
os.chdir('./bin')
|
os.chdir('./bin')
|
||||||
subprocess.call(['./xlnt.test'])
|
subprocess.call(['./xlnt.test'])
|
Loading…
Reference in New Issue
Block a user