Ver código fonte

Migrate portmidi

Remove old portmidi dependency.
master
TheoryOfNekomata 1 ano atrás
pai
commit
2d326b1f8b
3 arquivos alterados com 15 adições e 13 exclusões
  1. +14
    -12
      CMakeLists.txt
  2. +0
    -0
      __mocks__/subprojects/portmidi/portmidi.mock.h
  3. +1
    -1
      src/packages/game/input/input.test.c

+ 14
- 12
CMakeLists.txt Ver arquivo

@@ -16,11 +16,13 @@ if (WIN32)
)
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(IZ_PROJECT_ARCH x64)
set(IZ_SDL_ARCH x64)
add_definitions(
-DIZ_WIN64
)
else ()
set(IZ_PROJECT_ARCH x86)
set(IZ_SDL_ARCH Win32)
add_definitions(
-DIZ_WIN32
)
@@ -68,7 +70,7 @@ include_directories(
"${PROJECT_SOURCE_DIR}/subprojects/minIni/dev"
"${PROJECT_SOURCE_DIR}/subprojects/bdd-for-c"
"${PROJECT_SOURCE_DIR}/subprojects/bdd-for-c-mocks"
"${PROJECT_SOURCE_DIR}/dependencies/portmidi/pm_common"
"${PROJECT_SOURCE_DIR}/subprojects/portmidi/pm_common"
"${PROJECT_SOURCE_DIR}/dependencies/spine-runtimes/spine-c/spine-c/include"
"${PROJECT_SOURCE_DIR}/dependencies/getopt-for-windows"
"${PROJECT_SOURCE_DIR}/dependencies/libwebsockets/build/include"
@@ -78,10 +80,10 @@ include_directories(

if (IZ_PLATFORM STREQUAL "WINDOWS")
link_directories(
"${PROJECT_SOURCE_DIR}/subprojects/SDL/build/Release"
"${PROJECT_SOURCE_DIR}/subprojects/SDL/VisualC/${IZ_SDL_ARCH}/${CMAKE_BUILD_TYPE}"
"${PROJECT_SOURCE_DIR}/dependencies/SDL2_image/lib/${IZ_PROJECT_ARCH}"
"${PROJECT_SOURCE_DIR}/dependencies/SDL2_ttf/lib/${IZ_PROJECT_ARCH}"
"${PROJECT_SOURCE_DIR}/dependencies/portmidi/Release"
"${PROJECT_SOURCE_DIR}/subprojects/portmidi/build/Release"
"${PROJECT_SOURCE_DIR}/dependencies/libwebsockets/build/lib/Release"
"${PROJECT_SOURCE_DIR}/dependencies/openssl/${IZ_PROJECT_ARCH}/lib"
)
@@ -217,7 +219,7 @@ add_executable(
__mocks__/subprojects/SDL/SDL_events.mock.h
__mocks__/subprojects/SDL/SDL_joystick.mock.h
__mocks__/subprojects/SDL/SDL_stdinc.mock.h
__mocks__/dependencies/portmidi/portmidi.mock.h
__mocks__/subprojects/portmidi/portmidi.mock.h

src/packages/config/IZ_config.h

@@ -369,7 +371,7 @@ add_executable(
if (IZ_PLATFORM STREQUAL "WINDOWS")
add_custom_command(TARGET game POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_SOURCE_DIR}/subprojects/SDL/build/Release/SDL2.dll"
"${PROJECT_SOURCE_DIR}/subprojects/SDL/VisualC/${IZ_SDL_ARCH}/${CMAKE_BUILD_TYPE}/SDL2.dll"
$<TARGET_FILE_DIR:game>)

add_custom_command(TARGET game POST_BUILD
@@ -384,7 +386,7 @@ if (IZ_PLATFORM STREQUAL "WINDOWS")

add_custom_command(TARGET game POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_SOURCE_DIR}/dependencies/portmidi/Release/portmidi.dll"
"${PROJECT_SOURCE_DIR}/subprojects/portmidi/build/Release/portmidi.dll"
$<TARGET_FILE_DIR:game>)

add_custom_command(TARGET game POST_BUILD
@@ -394,17 +396,17 @@ if (IZ_PLATFORM STREQUAL "WINDOWS")

add_custom_command(TARGET game POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_SOURCE_DIR}/dependencies/openssl/${IZ_PROJECT_ARCH}/bin/libssl-1_1-x64.dll"
"${PROJECT_SOURCE_DIR}/dependencies/openssl/${IZ_PROJECT_ARCH}/bin/libssl-1_1-${IZ_SDL_ARCH}.dll"
$<TARGET_FILE_DIR:game>)

add_custom_command(TARGET game POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_SOURCE_DIR}/dependencies/openssl/${IZ_PROJECT_ARCH}/bin/libcrypto-1_1-x64.dll"
"${PROJECT_SOURCE_DIR}/dependencies/openssl/${IZ_PROJECT_ARCH}/bin/libcrypto-1_1-${IZ_SDL_ARCH}.dll"
$<TARGET_FILE_DIR:game>)

add_custom_command(TARGET server POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_SOURCE_DIR}/subprojects/SDL/build/Release/SDL2.dll"
"${PROJECT_SOURCE_DIR}/subprojects/SDL/VisualC/${IZ_SDL_ARCH}/${CMAKE_BUILD_TYPE}/SDL2.dll"
$<TARGET_FILE_DIR:server>)

add_custom_command(TARGET server POST_BUILD
@@ -414,17 +416,17 @@ if (IZ_PLATFORM STREQUAL "WINDOWS")

add_custom_command(TARGET server POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_SOURCE_DIR}/dependencies/openssl/${IZ_PROJECT_ARCH}/bin/libssl-1_1-x64.dll"
"${PROJECT_SOURCE_DIR}/dependencies/openssl/${IZ_PROJECT_ARCH}/bin/libssl-1_1-${IZ_SDL_ARCH}.dll"
$<TARGET_FILE_DIR:server>)

add_custom_command(TARGET server POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_SOURCE_DIR}/dependencies/openssl/${IZ_PROJECT_ARCH}/bin/libcrypto-1_1-x64.dll"
"${PROJECT_SOURCE_DIR}/dependencies/openssl/${IZ_PROJECT_ARCH}/bin/libcrypto-1_1-${IZ_SDL_ARCH}.dll"
$<TARGET_FILE_DIR:server>)

add_custom_command(TARGET game-test-input POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_SOURCE_DIR}/subprojects/SDL/build/Release/SDL2.dll"
"${PROJECT_SOURCE_DIR}/subprojects/SDL/VisualC/${IZ_SDL_ARCH}/${CMAKE_BUILD_TYPE}/SDL2.dll"
$<TARGET_FILE_DIR:game-test-input>)
endif ()



__mocks__/dependencies/portmidi/portmidi.mock.h → __mocks__/subprojects/portmidi/portmidi.mock.h Ver arquivo


+ 1
- 1
src/packages/game/input/input.test.c Ver arquivo

@@ -3,7 +3,7 @@
#include "../../../../__mocks__/subprojects/SDL/SDL_joystick.mock.h"
#include "../../../../__mocks__/subprojects/SDL/SDL_stdinc.mock.h"
#include "../../../../__mocks__/subprojects/minIni/minIni.mock.h"
#include "../../../../__mocks__/dependencies/portmidi/portmidi.mock.h"
#include "../../../../__mocks__/subprojects/portmidi/portmidi.mock.h"
#include "../../../../__mocks__/src/packages/stdinc/IZ_string.mock.h"
#include "../../../../__mocks__/src/packages/stdinc/IZ_stdlib.mock.h"
#include "../../../../__mocks__/src/packages/config/IZ_config.mock.h"


Carregando…
Cancelar
Salvar