-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup the cmake file a bit by moving things to include files.
- Loading branch information
Showing
3 changed files
with
73 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Crash Logger for MinGW | ||
if(WIN32) | ||
option(ENABLE_CRASH_LOGGER "Enable the Dr. MinGW crash logging facilities" OFF) | ||
set(DRMINGW_ROOT DRMINGW_ROOT-NOTFOUND CACHE PATH "Path to Dr. MinGW") | ||
|
||
if(NOT ENABLE_CRASH_LOGGER) | ||
message(STATUS "Crash Logger is OFF") | ||
else() | ||
message(STATUS "Crash Logger is ON") | ||
|
||
if(NOT DRMINGW_ROOT) | ||
message(VERBOSE "Downloading Dr. MinGW") | ||
|
||
if(${CMAKE_SIZEOF_VOID_P} EQUAL 4) | ||
set(DRMINGW_ARCH "32") | ||
else() | ||
set(DRMINGW_ARCH "64") | ||
endif() | ||
|
||
# 0.9.x seems to give a hard time to people on Win7. | ||
# Sticking with 0.8 for that reason. | ||
set(DRMINGW_VERSION "0.8.2") | ||
set(DRMINGW_BASENAME "drmingw-${DRMINGW_VERSION}-win${DRMINGW_ARCH}") | ||
set(DRMINGW_ROOT "${CMAKE_CURRENT_BINARY_DIR}/${DRMINGW_BASENAME}" CACHE PATH "Path to Dr. MinGW" FORCE) | ||
|
||
if(NOT EXISTS "${DRMINGW_ROOT}/bin/exchndl.dll") | ||
set(DRMINGW_ZIP "${CMAKE_CURRENT_BINARY_DIR}/${DRMINGW_BASENAME}.7z") | ||
|
||
file(DOWNLOAD "https://github.com/jrfonseca/drmingw/releases/download/${DRMINGW_VERSION}/${DRMINGW_BASENAME}.7z" "${DRMINGW_ZIP}" TIMEOUT 60 TLS_VERIFY ON) | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xf "${DRMINGW_ZIP}" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") | ||
endif() | ||
endif() | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
add_library(steamsdk INTERFACE) | ||
if (STEAMSDK) | ||
if(${CMAKE_SIZEOF_VOID_P} EQUAL 4) | ||
if(WIN32) | ||
target_link_libraries(steamsdk INTERFACE steam_api) | ||
target_link_directories(steamsdk INTERFACE "${STEAMSDK}/redistributable_bin") | ||
endif() | ||
if(UNIX AND NOT APPLE) | ||
target_link_libraries(steamsdk INTERFACE steam_api) | ||
target_link_directories(steamsdk INTERFACE "${STEAMSDK}/redistributable_bin/linux32") | ||
endif() | ||
else() | ||
if(WIN32) | ||
target_link_libraries(steamsdk INTERFACE steam_api64) | ||
target_link_directories(steamsdk INTERFACE "${STEAMSDK}/redistributable_bin/win64") | ||
endif() | ||
if(UNIX AND NOT APPLE) | ||
target_link_libraries(steamsdk INTERFACE steam_api) | ||
target_link_directories(steamsdk INTERFACE "${STEAMSDK}/redistributable_bin/linux64") | ||
endif() | ||
endif() | ||
target_include_directories(steamsdk INTERFACE "${STEAMSDK}/public") | ||
target_compile_definitions(steamsdk INTERFACE STEAMSDK=1) | ||
message(STATUS "Using steam SDK at ${STEAMSDK}") | ||
else() | ||
message(STATUS "Not using steam SDK") | ||
endif() |