Ensure proper compilation on Windows
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2020-01-09 17:20:18 +01:00
parent 2a39467899
commit b459ec8ee2
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 5 additions and 4 deletions

View File

@ -65,12 +65,9 @@ if (SCRIPT_PROVIDER STREQUAL "angelscript")
file(GLOB_RECURSE ANGELSCRIPT_SRC_FILES "src/AngelScript/*.cpp" "src/AngelScript/*.hpp") file(GLOB_RECURSE ANGELSCRIPT_SRC_FILES "src/AngelScript/*.cpp" "src/AngelScript/*.hpp")
add_library(pkmnLib-angelscript SHARED ${ANGELSCRIPT_SRC_FILES}) add_library(pkmnLib-angelscript SHARED ${ANGELSCRIPT_SRC_FILES})
SET(SCRIPT_PROVIDER_LIB_NAME "pkmnLib-angelscript") SET(SCRIPT_PROVIDER_LIB_NAME "pkmnLib-angelscript")
SET(_LINKS ${_LINKS} angelscript)
target_link_libraries(pkmnLib-angelscript PUBLIC ${_LINKS} angelscript)
endif() endif()
if (WINDOWS) if (WINDOWS)
message(STATUS "Using Windows build.") message(STATUS "Using Windows build.")
set(CMAKE_CXX_FLAGS "-L ${CMAKE_BINARY_DIR}/bin") set(CMAKE_CXX_FLAGS "-L ${CMAKE_BINARY_DIR}/bin")
@ -83,6 +80,10 @@ endif (WINDOWS)
target_link_libraries(pkmnLib PUBLIC ${_LINKS}) target_link_libraries(pkmnLib PUBLIC ${_LINKS})
if (SCRIPT_PROVIDER STREQUAL "angelscript")
target_link_libraries(pkmnLib-angelscript PUBLIC ${_LINKS})
endif()
if (NOT DEFINED CONAN_EXPORTED) if (NOT DEFINED CONAN_EXPORTED)
# Create Test executable # Create Test executable
file(GLOB_RECURSE TEST_FILES "tests/*.cpp" "tests/*.hpp") file(GLOB_RECURSE TEST_FILES "tests/*.cpp" "tests/*.hpp")