2018-08-27 17:16:01 +02:00
|
|
|
cmake_minimum_required(VERSION 3.1)
|
|
|
|
project(steamworks_c_wrapper)
|
|
|
|
|
|
|
|
if (NOT CMAKE_BUILD_TYPE)
|
|
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
include(cmake/FindSTEAMWORKS.cmake)
|
|
|
|
|
|
|
|
if (BIT_32)
|
|
|
|
MESSAGE("COMPILING 32 BIT")
|
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -m32")
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_DEBUG} -m32")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set (Windows 0)
|
|
|
|
set (Apple 0)
|
|
|
|
if (WIN32)
|
|
|
|
set(Windows 1)
|
|
|
|
elseif (APPLE)
|
|
|
|
set(Apple 1)
|
|
|
|
else()
|
|
|
|
#Linux
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
include_directories(${STEAMWORKS_INCLUDE_DIR})
|
|
|
|
|
2018-08-30 09:12:05 +02:00
|
|
|
if (WIN32)
|
|
|
|
add_library(steamworks_c_wrapper
|
|
|
|
src/steamworks_c_wrapper
|
2018-08-31 15:58:59 +02:00
|
|
|
src/CallbackHandler
|
2018-08-30 09:12:05 +02:00
|
|
|
)
|
|
|
|
else ()
|
|
|
|
add_library(steamworks_c_wrapper
|
|
|
|
SHARED
|
|
|
|
src/steamworks_c_wrapper
|
2018-09-02 06:04:24 +02:00
|
|
|
src/CallbackHandler
|
2018-08-30 09:12:05 +02:00
|
|
|
)
|
|
|
|
endif()
|
2018-08-27 17:16:01 +02:00
|
|
|
|
|
|
|
target_link_libraries(steamworks_c_wrapper ${STEAMWORKS_LIBRARY})
|
2018-08-29 14:03:18 +02:00
|
|
|
|
|
|
|
IF ( MSVC )
|
|
|
|
MESSAGE ( STATUS "Setting MSVC MT switches")
|
|
|
|
SET (
|
|
|
|
CMAKE_CXX_FLAGS_DEBUG
|
|
|
|
"${CMAKE_CXX_FLAGS_DEBUG} /MTd"
|
|
|
|
CACHE STRING "MSVC MT flags " FORCE
|
|
|
|
)
|
|
|
|
SET (
|
|
|
|
CMAKE_CXX_FLAGS_RELEASE
|
|
|
|
"${CMAKE_CXX_FLAGS_RELEASE} /MT"
|
|
|
|
CACHE STRING "MSVC MT flags " FORCE
|
|
|
|
)
|
|
|
|
endif ()
|