aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindCURL.cmake19
-rw-r--r--cmake/Modules/FindIrrlicht.cmake22
-rw-r--r--cmake/Modules/FindLuaJIT.cmake38
3 files changed, 46 insertions, 33 deletions
diff --git a/cmake/Modules/FindCURL.cmake b/cmake/Modules/FindCURL.cmake
index 2ec866ef9..43aaf3e18 100644
--- a/cmake/Modules/FindCURL.cmake
+++ b/cmake/Modules/FindCURL.cmake
@@ -1,19 +1,16 @@
mark_as_advanced(CURL_LIBRARY CURL_INCLUDE_DIR)
-find_library(CURL_LIBRARY NAMES curl)
+find_library(CURL_LIBRARY NAMES curl libcurl)
find_path(CURL_INCLUDE_DIR NAMES curl/curl.h)
-set(CURL_REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR)
-
if(WIN32)
- find_file(CURL_DLL NAMES libcurl-4.dll
- PATHS
- "C:/Windows/System32"
- DOC "Path to the cURL DLL (for installation)")
- mark_as_advanced(CURL_DLL)
- set(CURL_REQUIRED_VARS ${CURL_REQUIRED_VARS} CURL_DLL)
+ # If VCPKG_APPLOCAL_DEPS is ON, dll's are automatically handled by VCPKG
+ if(NOT VCPKG_APPLOCAL_DEPS)
+ find_file(CURL_DLL NAMES libcurl-4.dll libcurl.dll
+ DOC "Path to the cURL DLL (for installation)")
+ mark_as_advanced(CURL_DLL)
+ endif()
endif()
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(CURL DEFAULT_MSG ${CURL_REQUIRED_VARS})
-
+find_package_handle_standard_args(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR)
diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake
index 37349b892..6f361e829 100644
--- a/cmake/Modules/FindIrrlicht.cmake
+++ b/cmake/Modules/FindIrrlicht.cmake
@@ -43,6 +43,7 @@ else()
/usr/local/include/irrlicht
/usr/include/irrlicht
/system/develop/headers/irrlicht #Haiku
+ PATH_SUFFIXES "include/irrlicht"
)
find_library(IRRLICHT_LIBRARY NAMES libIrrlicht.so libIrrlicht.a Irrlicht
@@ -56,16 +57,19 @@ endif()
# On Windows, find the DLL for installation
if(WIN32)
- if(MSVC)
- set(IRRLICHT_COMPILER "VisualStudio")
- else()
- set(IRRLICHT_COMPILER "gcc")
+ # If VCPKG_APPLOCAL_DEPS is ON, dll's are automatically handled by VCPKG
+ if(NOT VCPKG_APPLOCAL_DEPS)
+ if(MSVC)
+ set(IRRLICHT_COMPILER "VisualStudio")
+ else()
+ set(IRRLICHT_COMPILER "gcc")
+ endif()
+ find_file(IRRLICHT_DLL NAMES Irrlicht.dll
+ PATHS
+ "${IRRLICHT_SOURCE_DIR}/bin/Win32-${IRRLICHT_COMPILER}"
+ DOC "Path of the Irrlicht dll (for installation)"
+ )
endif()
- find_file(IRRLICHT_DLL NAMES Irrlicht.dll
- PATHS
- "${IRRLICHT_SOURCE_DIR}/bin/Win32-${IRRLICHT_COMPILER}"
- DOC "Path of the Irrlicht dll (for installation)"
- )
endif(WIN32)
include(FindPackageHandleStandardArgs)
diff --git a/cmake/Modules/FindLuaJIT.cmake b/cmake/Modules/FindLuaJIT.cmake
index cd6e7bdd8..3f5cc1cf4 100644
--- a/cmake/Modules/FindLuaJIT.cmake
+++ b/cmake/Modules/FindLuaJIT.cmake
@@ -19,19 +19,31 @@ FIND_PATH(LUA_INCLUDE_DIR luajit.h
/opt
)
-FIND_LIBRARY(LUA_LIBRARY
- NAMES luajit-5.1
- HINTS
- $ENV{LUA_DIR}
- PATH_SUFFIXES lib64 lib
- PATHS
- ~/Library/Frameworks
- /Library/Frameworks
- /sw
- /opt/local
- /opt/csw
- /opt
-)
+# Test if running on vcpkg toolchain
+if(DEFINED VCPKG_TARGET_TRIPLET AND DEFINED VCPKG_APPLOCAL_DEPS)
+ # On vcpkg luajit is 'lua51' and normal lua is 'lua'
+ FIND_LIBRARY(LUA_LIBRARY
+ NAMES lua51
+ HINTS
+ $ENV{LUA_DIR}
+ PATH_SUFFIXES lib
+ )
+else()
+ FIND_LIBRARY(LUA_LIBRARY
+ NAMES luajit-5.1
+ HINTS
+ $ENV{LUA_DIR}
+ PATH_SUFFIXES lib64 lib
+ PATHS
+ ~/Library/Frameworks
+ /Library/Frameworks
+ /sw
+ /opt/local
+ /opt/csw
+ /opt
+ )
+endif()
+
IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/luajit.h")
FILE(STRINGS "${LUA_INCLUDE_DIR}/luajit.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT .+\"")