Skip to content

Commit

Permalink
fix: re-add SFSE_SUPPORT_XBYAK (#40)
Browse files Browse the repository at this point in the history
This option was removed for always enabling xbyak, but not a wise
decision, this PR reverts it and defaulted it off.
  • Loading branch information
gottyduke authored Sep 13, 2023
1 parent 3e4d405 commit 3524b30
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions CommonLibSF/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ if(TARGET CommonLibSF)
return()
endif()

# options if not defined
option(SFSE_SUPPORT_XBYAK "Enables trampoline support for Xbyak." OFF)

# standards & flags
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand All @@ -29,7 +32,6 @@ endif()

# dependencies
find_package(spdlog CONFIG REQUIRED)
find_package(xbyak CONFIG REQUIRED)

# source files
execute_process(COMMAND powershell -ExecutionPolicy Bypass -File "${CMAKE_CURRENT_SOURCE_DIR}/cmake/make-sourcelist.ps1" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}")
Expand Down Expand Up @@ -113,10 +115,19 @@ target_link_libraries(
${PROJECT_NAME}
PUBLIC
spdlog::spdlog
xbyak::xbyak
Version.lib
)

if (SFSE_SUPPORT_XBYAK)
find_package(xbyak CONFIG REQUIRED)

target_link_libraries(
${PROJECT_NAME}
PUBLIC
xbyak::xbyak
)
endif()

target_precompile_headers(
${PROJECT_NAME}
PRIVATE
Expand Down

0 comments on commit 3524b30

Please sign in to comment.