Skip to content

Commit

Permalink
No hack(
Browse files Browse the repository at this point in the history
  • Loading branch information
Stepanov Igor committed Jan 9, 2025
1 parent 9dcbc04 commit dedb52e
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,29 @@ endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
find_package(glfw3 REQUIRED)
find_package(vorbis REQUIRED)
# if(MSVC)
add_library(luajit IMPORTED)
set_target_properties(
luajit
PROPERTIES
IMPORTED_LOCATION
"$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/bin/lua51.dll"
IMPORTED_IMPLIB
"$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/lib/lua51.lib"
INTERFACE_INCLUDE_DIRECTORIES
"$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/include/luajit"
)
# else() add_library(luajit STATIC IMPORTED) set_target_properties( luajit
# PROPERTIES IMPORTED_IMPLIB
# "$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/lib/lua51.lib"
# INTERFACE_INCLUDE_DIRECTORIES
# "$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/include/luajit"
# ) endif()
if(MSVC)
add_library(luajit SHARED IMPORTED)
set_target_properties(
luajit
PROPERTIES
IMPORTED_LOCATION
"$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/bin/lua51.dll"
IMPORTED_IMPLIB
"$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/lib/lua51.lib"
INTERFACE_INCLUDE_DIRECTORIES
"$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/include/luajit"
)
else()
add_library(luajit STATIC IMPORTED)
set_target_properties(
luajit
PROPERTIES
IMPORTED_IMPLIB
"$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/lib/lua51.lib"
INTERFACE_INCLUDE_DIRECTORIES
"$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/include/luajit"
)
endif()

add_library(luajit::luajit ALIAS luajit)
else()
Expand Down

0 comments on commit dedb52e

Please sign in to comment.