Skip to content

Commit

Permalink
Remove the old scripts, fix the target assambling the package
Browse files Browse the repository at this point in the history
  • Loading branch information
mwydmuch committed Dec 12, 2023
1 parent b45c8cd commit a040230
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 132 deletions.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.12)
# Project + versions
#-----------------------------------------------------------------------------------------------------------------------

project(ViZDoom VERSION 1.2.2)
project(ViZDoom VERSION 1.3.0)
set(ViZDoom_VERSION_STR ${ViZDoom_VERSION_MAJOR}.${ViZDoom_VERSION_MINOR}.${ViZDoom_VERSION_PATCH})
set(ViZDoom_VERSION_ID ${ViZDoom_VERSION_MAJOR}${ViZDoom_VERSION_MINOR}${ViZDoom_VERSION_PATCH})

Expand Down Expand Up @@ -68,6 +68,14 @@ endif()
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")

if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "arm64")
set(CMAKE_OSX_ARCHITECTURES "arm64" CACHE INTERNAL "" FORCE)
message(STATUS "Apple Silicon detected, building for arm64")
else()
set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE INTERNAL "" FORCE)
message(STATUS "Intel CPU detected, building for x86_64")
endif()
endif(APPLE)


Expand Down
61 changes: 0 additions & 61 deletions scripts/assemble_pip_package.bat

This file was deleted.

60 changes: 0 additions & 60 deletions scripts/assemble_pip_package.sh

This file was deleted.

11 changes: 1 addition & 10 deletions src/lib_python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ if(WIN32)
endif()

set(VIZDOOM_PYTHON_OUTPUT_DIR ${VIZDOOM_OUTPUT_DIR}/python${BUILD_PYTHON_VERSION})
set(VIZDOOM_PYTHON_PACKAGE_DIR ${VIZDOOM_PYTHON_OUTPUT_DIR}/vizdoom)
set(VIZDOOM_PYTHON_SRC_DIR ${VIZDOOM_SRC_DIR}/lib_python)
set(VIZDOOM_PYTHON_INCLUDE_DIR ${VIZDOOM_INCLUDE_DIR} ${VIZDOOM_PYTHON_SRC_DIR})

Expand Down Expand Up @@ -70,16 +71,6 @@ set_target_properties(libvizdoom_python
OUTPUT_NAME vizdoom
PROJECT_LABEL "python${BUILD_PYTHON_VERSION} binding")

# if(UNIX)
# add_custom_target(python_pip_package ALL
# COMMAND ${VIZDOOM_SCRIPTS_DIR}/assemble_pip_package.sh ${BUILD_PYTHON_VERSION} ${VIZDOOM_OUTPUT_DIR} ${CMAKE_SOURCE_DIR}
# COMMENT "Assembling pip package in ${VIZDOOM_PYTHON_OUTPUT_DIR}/pip_package")
# elseif(WIN32)
# add_custom_target(python_pip_package ALL
# COMMAND ${VIZDOOM_SCRIPTS_DIR}/assemble_pip_package.bat ${BUILD_PYTHON_VERSION} ${VIZDOOM_OUTPUT_DIR} ${CMAKE_SOURCE_DIR}
# COMMENT "Assembling pip package in ${VIZDOOM_PYTHON_OUTPUT_DIR}/pip_package")
# endif()

add_custom_target(assemble_package ALL
COMMAND ${CMAKE_COMMAND} -E make_directory ${VIZDOOM_PYTHON_PACKAGE_DIR}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:libvizdoom_python> ${VIZDOOM_PYTHON_PACKAGE_DIR}
Expand Down

0 comments on commit a040230

Please sign in to comment.