Allow setting for Windows build in Conan.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
4d3dc28606
commit
ecb17a8bad
|
@ -8,6 +8,13 @@ project(CreatureLib)
|
|||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
if (EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
conan_basic_setup()
|
||||
else ()
|
||||
message(WARNING "The file conanbuildinfo.cmake doesn't exist, you have to run conan install first")
|
||||
endif ()
|
||||
|
||||
if (WINDOWS)
|
||||
ADD_DEFINITIONS(-D WINDOWS=1)
|
||||
endif (WINDOWS)
|
||||
|
@ -57,10 +64,3 @@ if (NOT DEFINED CONAN_EXPORTED)
|
|||
# Add a definition for the test library
|
||||
target_compile_definitions(CreatureLibTests PRIVATE TESTS_BUILD)
|
||||
endif ()
|
||||
|
||||
if (EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
conan_basic_setup()
|
||||
else ()
|
||||
message(WARNING "The file conanbuildinfo.cmake doesn't exist, you have to run conan install first")
|
||||
endif ()
|
||||
|
|
|
@ -7,14 +7,15 @@ class CreatureLibConan(ConanFile):
|
|||
url = "https://git.p-epsilon.com/Deukhoofd/CreatureLib"
|
||||
description = "The core implementation for turn based battling using creatures."
|
||||
settings = "compiler"
|
||||
options = {"shared": [True, False]}
|
||||
default_options = {"shared": True}
|
||||
options = {"shared": [True, False], "windows": [True, False]}
|
||||
default_options = {"shared": True, "windows": False}
|
||||
generators = "cmake"
|
||||
exports_sources = "*"
|
||||
compiler = "clang"
|
||||
|
||||
def build(self):
|
||||
cmake = CMake(self)
|
||||
cmake.definitions["WINDOWS"] = self.settings.get_safe("windows")
|
||||
cmake.configure()
|
||||
cmake.build()
|
||||
|
||||
|
|
Loading…
Reference in New Issue