Merge remote-tracking branch 'origin/dev' into mrexodia-msvc-find-lib
This commit is contained in:
commit
42e52cd4c7
|
@ -71,6 +71,18 @@ jobs:
|
||||||
uses: microsoft/setup-msbuild@v1.0.3
|
uses: microsoft/setup-msbuild@v1.0.3
|
||||||
with:
|
with:
|
||||||
vs-version: '16.5'
|
vs-version: '16.5'
|
||||||
|
|
||||||
|
- name: '🛠️ Win MSVC 32 dev cmd setup'
|
||||||
|
if: contains(matrix.config.name, 'win32')
|
||||||
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
|
with:
|
||||||
|
arch: x86
|
||||||
|
|
||||||
|
- name: '🛠️ Win MSVC 64 dev cmd setup'
|
||||||
|
if: contains(matrix.config.name, 'win_amd64')
|
||||||
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
|
with:
|
||||||
|
arch: x64
|
||||||
|
|
||||||
- name: '🛠️ Win build dependencies'
|
- name: '🛠️ Win build dependencies'
|
||||||
if: contains(matrix.config.name, 'win')
|
if: contains(matrix.config.name, 'win')
|
||||||
|
|
|
@ -31,7 +31,8 @@ jobs:
|
||||||
arch: x64,
|
arch: x64,
|
||||||
python-arch: x64,
|
python-arch: x64,
|
||||||
python-ver: '3.8',
|
python-ver: '3.8',
|
||||||
name: 'windows-x64 MINGW64',
|
name: 'windows-x64 MINGW64 shared',
|
||||||
|
shared: 'yes',
|
||||||
mingw: MINGW64,
|
mingw: MINGW64,
|
||||||
mingw-arch: x86_64,
|
mingw-arch: x86_64,
|
||||||
artifact: 'windows_mingw64.7z',
|
artifact: 'windows_mingw64.7z',
|
||||||
|
@ -44,7 +45,36 @@ jobs:
|
||||||
arch: x64,
|
arch: x64,
|
||||||
python-arch: x64,
|
python-arch: x64,
|
||||||
python-ver: '3.8',
|
python-ver: '3.8',
|
||||||
name: 'windows-x64 MINGW32',
|
name: 'windows-x64 MINGW64 static',
|
||||||
|
shared: 'no',
|
||||||
|
mingw: MINGW64,
|
||||||
|
mingw-arch: x86_64,
|
||||||
|
artifact: 'windows_mingw64.7z',
|
||||||
|
build_type: 'Debug',
|
||||||
|
archiver: '7z a',
|
||||||
|
generators: 'Ninja'
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
os: windows-2019,
|
||||||
|
arch: x64,
|
||||||
|
python-arch: x64,
|
||||||
|
python-ver: '3.8',
|
||||||
|
name: 'windows-x64 MINGW32 shared',
|
||||||
|
shared: "yes",
|
||||||
|
mingw: MINGW32,
|
||||||
|
mingw-arch: i686,
|
||||||
|
artifact: 'windows_mingw32.7z',
|
||||||
|
build_type: 'Debug',
|
||||||
|
archiver: '7z a',
|
||||||
|
generators: 'Ninja'
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
os: windows-2019,
|
||||||
|
arch: x64,
|
||||||
|
python-arch: x64,
|
||||||
|
python-ver: '3.8',
|
||||||
|
name: 'windows-x64 MINGW32 static',
|
||||||
|
shared: "no",
|
||||||
mingw: MINGW32,
|
mingw: MINGW32,
|
||||||
mingw-arch: i686,
|
mingw-arch: i686,
|
||||||
artifact: 'windows_mingw32.7z',
|
artifact: 'windows_mingw32.7z',
|
||||||
|
@ -124,6 +154,12 @@ jobs:
|
||||||
- name: '🛠️ Win MSVC 64 setup'
|
- name: '🛠️ Win MSVC 64 setup'
|
||||||
if: contains(matrix.config.name, 'MSVC 64')
|
if: contains(matrix.config.name, 'MSVC 64')
|
||||||
uses: microsoft/setup-msbuild@v1
|
uses: microsoft/setup-msbuild@v1
|
||||||
|
|
||||||
|
- name: '🛠️ Win MSVC 64 dev cmd setup'
|
||||||
|
if: contains(matrix.config.name, 'MSVC 64')
|
||||||
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
|
with:
|
||||||
|
arch: x64
|
||||||
|
|
||||||
- name: '🚧 Win MSVC 64 build'
|
- name: '🚧 Win MSVC 64 build'
|
||||||
if: contains(matrix.config.name, 'MSVC 64')
|
if: contains(matrix.config.name, 'MSVC 64')
|
||||||
|
@ -138,7 +174,8 @@ jobs:
|
||||||
-B . \
|
-B . \
|
||||||
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
||||||
-G "${{ matrix.config.generators }}" \
|
-G "${{ matrix.config.generators }}" \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=instdir
|
-DCMAKE_INSTALL_PREFIX:PATH=instdir \
|
||||||
|
-DBUILD_SHARED_LIBS=${{ matrix.config.shared }}
|
||||||
cmake --build . --config ${{ matrix.config.build_type }}
|
cmake --build . --config ${{ matrix.config.build_type }}
|
||||||
cmake --install . --strip --config ${{ matrix.config.build_type }}
|
cmake --install . --strip --config ${{ matrix.config.build_type }}
|
||||||
ctest -VV -C ${{ matrix.config.build_type }}
|
ctest -VV -C ${{ matrix.config.build_type }}
|
||||||
|
@ -164,7 +201,8 @@ jobs:
|
||||||
-A "win32" \
|
-A "win32" \
|
||||||
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
||||||
-G "${{ matrix.config.generators }}" \
|
-G "${{ matrix.config.generators }}" \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=instdir
|
-DCMAKE_INSTALL_PREFIX:PATH=instdir \
|
||||||
|
-DBUILD_SHARED_LIBS=${{ matrix.config.shared }}
|
||||||
cmake --build . --config ${{ matrix.config.build_type }}
|
cmake --build . --config ${{ matrix.config.build_type }}
|
||||||
cmake --install . --strip --config ${{ matrix.config.build_type }}
|
cmake --install . --strip --config ${{ matrix.config.build_type }}
|
||||||
ctest -VV -C ${{ matrix.config.build_type }}
|
ctest -VV -C ${{ matrix.config.build_type }}
|
||||||
|
@ -191,7 +229,8 @@ jobs:
|
||||||
-B . \
|
-B . \
|
||||||
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
||||||
-G "${{ matrix.config.generators }}" \
|
-G "${{ matrix.config.generators }}" \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=instdir
|
-DCMAKE_INSTALL_PREFIX:PATH=instdir \
|
||||||
|
-DBUILD_SHARED_LIBS=${{ matrix.config.shared }}
|
||||||
cmake --build . --config ${{ matrix.config.build_type }}
|
cmake --build . --config ${{ matrix.config.build_type }}
|
||||||
cmake --install . --strip
|
cmake --install . --strip
|
||||||
ctest -VV -C ${{ matrix.config.build_type }}
|
ctest -VV -C ${{ matrix.config.build_type }}
|
||||||
|
@ -277,7 +316,7 @@ jobs:
|
||||||
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
||||||
-G "${{ matrix.config.generators }}" \
|
-G "${{ matrix.config.generators }}" \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=instdir \
|
-DCMAKE_INSTALL_PREFIX:PATH=instdir \
|
||||||
-DBUILD_SHARED_LIB= ${{ matrix.config.shared }}
|
-DBUILD_SHARED_LIBS=${{ matrix.config.shared }}
|
||||||
cmake --build . --config ${{ matrix.config.build_type }}
|
cmake --build . --config ${{ matrix.config.build_type }}
|
||||||
cmake --install . --strip
|
cmake --install . --strip
|
||||||
ctest -VV -C ${{ matrix.config.build_type }}
|
ctest -VV -C ${{ matrix.config.build_type }}
|
||||||
|
|
|
@ -1361,6 +1361,10 @@ endif()
|
||||||
|
|
||||||
# Black magic for generating static archives...
|
# Black magic for generating static archives...
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
|
if (MSVC)
|
||||||
|
# Avoid the import lib built by MVSC clash with our archive.
|
||||||
|
set_target_properties(unicorn PROPERTIES ARCHIVE_OUTPUT_NAME "unicorn-import")
|
||||||
|
endif()
|
||||||
bundle_static_library(unicorn_static unicorn_archive unicorn)
|
bundle_static_library(unicorn_static unicorn_archive unicorn)
|
||||||
else()
|
else()
|
||||||
# Rename the "static" lib to avoid filename clash.
|
# Rename the "static" lib to avoid filename clash.
|
||||||
|
|
|
@ -55,7 +55,7 @@ function(bundle_static_library tgt_name bundled_tgt_name library_name)
|
||||||
OUTPUT ${bundled_tgt_full_name}
|
OUTPUT ${bundled_tgt_full_name}
|
||||||
COMMENT "Bundling ${bundled_tgt_name}"
|
COMMENT "Bundling ${bundled_tgt_name}"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
elseif(UNIX)
|
elseif(UNIX OR MINGW)
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/${bundled_tgt_name}.ar.in
|
file(WRITE ${CMAKE_BINARY_DIR}/${bundled_tgt_name}.ar.in
|
||||||
"CREATE ${bundled_tgt_full_name}\n" )
|
"CREATE ${bundled_tgt_full_name}\n" )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue