Skip to content

Commit

Permalink
Refactor Windows defines with generator expression
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesKauffmann authored and kblaschke committed Jun 11, 2023
1 parent 8b67eac commit 91bc04d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/libprojectM/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
add_compile_definitions(
DATADIR_PATH="${PROJECTM_DATADIR_PATH}"
$<IF:$<PLATFORM_ID:Darwin>,GL_SILENCE_DEPRECATION,>
$<IF:$<PLATFORM_ID:Windows>,NOMINMAX,>
$<IF:$<PLATFORM_ID:Windows>,WIN32_LEAN_AND_MEAN,>
$<IF:$<PLATFORM_ID:Windows>,STBI_NO_DDS,>
)

if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
# dirent.h support
set(MSVC_EXTRA_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/msvc")
include_directories("${MSVC_EXTRA_INCLUDE_DIR}")

# Additional preprocessor definitions for Windows builds
add_compile_definitions(
NOMINMAX
WIN32_LEAN_AND_MEAN
STBI_NO_DDS
)
endif()

# List of targets used in export().
Expand Down

0 comments on commit 91bc04d

Please sign in to comment.