aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt18
1 files changed, 12 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c8716d..a8eee6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,12 @@ project(O-3000-Color-Pipe)
cmake_minimum_required(VERSION 3.0)
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(CC_ARCH "64")
+else(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(CC_ARCH "32")
+endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -44,13 +50,13 @@ target_compile_options(${LIB_NAME} PRIVATE -Wall -g -O3 -std=c11 -ggdb -D_XOPEN_
install(TARGETS ${LIB_NAME} DESTINATION lib)
install(FILES "color_pipe.h" DESTINATION "include/o3000")
-add_custom_target(release_mingw64 DEPENDS ${LIB_NAME})
+add_custom_target(release DEPENDS ${LIB_NAME})
add_custom_command(
- TARGET release_mingw64
+ TARGET release
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/libo3000_imgpipe-${VERSION_STR}/include/o3000
- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/libo3000_imgpipe-${VERSION_STR}/MinGW64
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/libo3000_imgpipe-${VERSION_STR}/MinGW${CC_ARCH}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/color_pipe.h ${CMAKE_CURRENT_BINARY_DIR}/libo3000_imgpipe-${VERSION_STR}/include/o3000
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_NAME:${LIB_NAME}>* ${CMAKE_CURRENT_BINARY_DIR}/libo3000_imgpipe-${VERSION_STR}/MinGW64
- COMMAND ${CMAKE_COMMAND} -E tar "cfv" "libo3000_imgpipe-${VERSION_STR}.zip" --format=zip libo3000_imgpipe-${VERSION_STR}
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_NAME:${LIB_NAME}>* ${CMAKE_CURRENT_BINARY_DIR}/libo3000_imgpipe-${VERSION_STR}/MinGW${CC_ARCH}
+ COMMAND ${CMAKE_COMMAND} -E tar "cfv" "libo3000_imgpipe-${VERSION_STR}-${CC_ARCH}bit.zip" --format=zip libo3000_imgpipe-${VERSION_STR}
COMMAND ${CMAKE_COMMAND} -E remove_directory libo3000_imgpipe-${VERSION_STR}
-)
+) \ No newline at end of file