Skip to content

Commit

Permalink
fix windows compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sr99622 committed Apr 2, 2024
1 parent a8da1f2 commit 664f8d5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
13 changes: 10 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,23 @@

cmake_minimum_required(VERSION 3.17)

project(libavio VERSION 3.1.1)
project(libavio VERSION 3.1.2)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")

list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# pass current dir in from host when building in virtual env
set (MY_CURRENT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
if (DEFINED ENV{CMAKE_CURRENT_SOURCE_DIR})
set(MY_CURRENT_DIR $ENV{CMAKE_CURRENT_SOURCE_DIR})
endif()
file(TO_CMAKE_PATH "${MY_CURRENT_DIR}" MY_DIR_VAR)

list(PREPEND CMAKE_MODULE_PATH ${MY_DIR_VAR}/cmake)

if(WIN32)
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake-win)
list(PREPEND CMAKE_MODULE_PATH ${MY_DIR_VAR}/cmake-win)
add_compile_options("/EHsc")
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
set(BUILD_SHARED_LIBS TRUE)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "avio"
version = "3.1.1"
version = "3.1.2"
authors = [
{ name="Stephen Rhodes", email="sr99622@gmail.com" },
]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from setuptools.command.build_ext import build_ext

PKG_NAME = "avio"
VERSION = "3.1.1"
VERSION = "3.1.2"

class CMakeExtension(Extension):
def __init__(self, name, sourcedir=""):
Expand Down

0 comments on commit 664f8d5

Please sign in to comment.