Add FindWine module and use it in main CMakeLists.txt
Old CheckLibraryExists implementation didn't work on my system. A find module should be better and also easier to maintain.
This commit is contained in:
19
cmake/modules/FindWine.cmake
Normal file
19
cmake/modules/FindWine.cmake
Normal file
@@ -0,0 +1,19 @@
|
||||
# - Try to find the wine libraries
|
||||
# Once done this will define
|
||||
#
|
||||
# WINE_FOUND - System has wine
|
||||
# WINE_INCLUDE_DIRS - The wine include directories
|
||||
# WINE_LIBRARIES - The libraries needed to use wine
|
||||
# WINE_DEFINITIONS - Compiler switches required for using wine
|
||||
#
|
||||
|
||||
FIND_PATH(WINE_INCLUDE_DIR windows/windows.h PATH_SUFFIXES wine)
|
||||
FIND_LIBRARY(WINE_LIBRARY NAMES wine)
|
||||
|
||||
set(WINE_INCLUDE_DIRS ${WINE_INCLUDE_DIR} )
|
||||
set(WINE_LIBRARIES ${WINE_LIBRARY} )
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Wine DEFAULT_MSG WINE_LIBRARIES WINE_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced(WINE_INCLUDE_DIR WINE_LIBRARY)
|
||||
Reference in New Issue
Block a user