Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: Update FindDiaSDK #4652

Merged
merged 1 commit into from
Dec 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions cmake/modules/FindDiaSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,27 @@
# leave the other hints as well.
get_filename_component(VSPath ${CMAKE_CXX_COMPILER} DIRECTORY CACHE)

# Note we need to tell CMake to search DiaSDK_ROOT
# this is default behavior on newer versions of cmake
find_path(DIA2_H_DIR "dia2.h"
HINTS
"${VSPath}/../../../DIA SDK/include"
"$ENV{DIASDK}\\include"
"$ENV{VSSDK140Install}..\\DIA SDK\\include"
"$ENV{DIASDK}/include"
"$ENV{VSSDK140Install}../DIA SDK/include"
"${DiaSDK_ROOT}/include"
)

if(OMR_ENV_DATA64)
set(lib_dir "lib/amd64")
else()
set(lib_dir "lib")
endif()
find_library(DIAGUIDS_LIBRARY "diaguids"
HINTS
"${VSPath}/../../../DIA SDK/lib"
"$ENV{DIASDK}\\lib"
"$ENV{VSSDK140Install}..\\DIA SDK\\lib"
"${VSPath}/../../../DIA SDK/${lib_dir}"
"$ENV{DIASDK}/${lib_dir}"
"$ENV{VSSDK140Install}../DIA SDK/${lib_dir}"
"${DiaSDK_ROOT}/${lib_dir}"
)

include (FindPackageHandleStandardArgs)
Expand Down