Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
CMake: Fix potential future cmake compat issue
Fixes CMP0054 warning with CMake 3.

See: bug #694
  • Loading branch information
dscharrer committed Dec 9, 2014
1 parent 20a06fe commit a165624
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cmake/BuildSystem.cmake
Expand Up @@ -45,7 +45,7 @@ function(enable_unity_build UB_SUFFIX SOURCE_VARIABLE_NAME)
set(currentIdx 1)
foreach(source_file IN LISTS files)

if("${source_file}" MATCHES ".rc$")
if(source_file MATCHES ".rc$")

# .rc files need to be compiled separately

Expand Down Expand Up @@ -120,7 +120,8 @@ endfunction()
# BIN Name of the binary to change the type of.
# DIR Where to install the binary.
function(set_binary_installdir BIN DIR)
if("${SHARED_BUILD_${BIN}_TYPE}" STREQUAL "SHARED")
set(build_type "${SHARED_BUILD_${BIN}_TYPE}")
if(build_type STREQUAL "SHARED")
set(install LIBRARY DESTINATION "${DIR}" ARCHIVE DESTINATION "${DIR}")
else()
set(install RUNTIME DESTINATION "${DIR}")
Expand Down Expand Up @@ -255,7 +256,8 @@ function(_shared_build_helper LIB LIST BINARIES FIRST)
# Remove sources from binaries and link the library instead.
foreach(bin IN LISTS BINARIES)

if("${SHARED_BUILD_${bin}_TYPE}" STREQUAL "SHARED")
set(build_type "${SHARED_BUILD_${bin}_TYPE}")
if(build_type STREQUAL "SHARED")
set(is_shared_lib 1)
endif()

Expand Down Expand Up @@ -307,7 +309,8 @@ function(_shared_build_add_binary bin)
endforeach()
endif()

if("${SHARED_BUILD_${bin}_TYPE}" STREQUAL "SHARED")
set(build_type "${SHARED_BUILD_${bin}_TYPE}")
if(build_type STREQUAL "SHARED")
add_library(
${bin} ${SHARED_BUILD_${bin}_TYPE}
${SHARED_BUILD_${bin}_SOURCES}
Expand Down

0 comments on commit a165624

Please sign in to comment.