diff options
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rwxr-xr-x | release_it.sh | 42 | ||||
-rw-r--r-- | src/CMakeLists.txt | 2 |
3 files changed, 48 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 905e17d..491645c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,11 @@ CHECK_INCLUDE_FILE (stdbool.h HAVE_STDBOOL_H) #option(${PROJECT_NAME}_WITH_DOCS "generate Documentation" OFF)
#option(${PROJECT_NAME}_WITH_TESTS "enable testing" ON)
option(CMAKE_SUPPRESS_REGENERATION "suppress rules to re-run cmake on changes (warning: no dependency checks!)?" OFF)
-set(RE2C ${CMAKE_CURRENT_SOURCE_DIR}/re2c)
+if (MSVC)
+ set(RE2C ${CMAKE_CURRENT_SOURCE_DIR}/re2c)
+else(MSVC)
+ set(RE2C re2c)
+endif(MSVC)
if (MSVC)
option(PROJECT_LINK_MSVC_MT "link with /MT instead of /MD (use msvc runtime dlls versus static linked)" ON)
diff --git a/release_it.sh b/release_it.sh new file mode 100755 index 0000000..b83772a --- /dev/null +++ b/release_it.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +HOST_SYSTEM=`uname -s` +HOST_ARCH=`uname -m` +STARTDIR=`pwd` + +CMAKE_BUILDDIR=build/$HOST_ARCH-$HOST_SYSTEM + +mkdir -p $CMAKE_BUILDDIR + +cd $CMAKE_BUILDDIR + +if test $HOST_SYSTEM = "Darwin" ; then + cmake -DChronolog_WITH_DOCS:bool=ON \ + -DChronolog_WITH_TESTS:bool=ON \ + -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk \ + $STARTDIR; + cd $STARTDIR + + mkdir -p build/Xcode + cd build/Xcode + cmake -DChronolog_WITH_DOCS:bool=ON \ + -DChronolog_WITH_TESTS:bool=ON \ + -DCXXTEST_INCLUDE_DIR=3rdparty/cxxtest \ + -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk \ + -G Xcode $STARTDIR; + cd $STARTDIR + +elif test $HOST_SYSTEM = "Linux" ; then + cmake -DChronolog_WITH_DOCS:bool=ON \ + -DChronolog_WITH_TESTS:bool=ON \ + $STARTDIR; +else + echo "not supported"; +fi + +cd $CMAKE_BUILDDIR +cpack --config CPackSourceConfig.cmake +cmake --build . --target all --target test --target package +cmake --build . --target package_source +cd $STARTDIR + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 35de787..01a2bf7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -38,7 +38,7 @@ set_property(TARGET PROGRAM_stmd # if sometimes libs are needed ...
#target_link_libraries(${PROGRAM_chronolog})
endif(MSVC)
-install(TARGETS PROGRAM_stmd
+install(TARGETS ${PROGRAM_stmd}
RUNTIME DESTINATION bin
BUNDLE DESTINATION Applications)
|