Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.
Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.
This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.
Addtiionally, this heavily improves our detection of libraries, etc.
2019-04-07 09:57:55 +00:00
|
|
|
# Autodetect editbin. Only useful for MSVC.
|
|
|
|
|
2020-09-25 11:55:25 +00:00
|
|
|
if(NOT EDITBIN_DIRECTORY)
|
|
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
2020-08-05 03:15:20 +00:00
|
|
|
get_filename_component(MSVC_COMPILE_DIRECTORY ${CMAKE_CXX_COMPILER} DIRECTORY)
|
|
|
|
set(EDITBIN_DIRECTORY ${MSVC_COMPILE_DIRECTORY})
|
2020-09-25 11:55:25 +00:00
|
|
|
else()
|
2020-08-05 03:15:20 +00:00
|
|
|
# For clang-cl build
|
|
|
|
# find editbin.exe from environmental variable VCToolsInstallDir
|
|
|
|
set(EDITBIN_DIRECTORY "$ENV{VCToolsInstallDir}/bin/Hostx64/x64")
|
2020-09-25 11:55:25 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
2020-08-05 03:15:20 +00:00
|
|
|
|
|
|
|
message(CHECK_START "Finding editbin.exe")
|
Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.
Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.
This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.
Addtiionally, this heavily improves our detection of libraries, etc.
2019-04-07 09:57:55 +00:00
|
|
|
find_program(
|
|
|
|
EDITBIN_EXECUTABLE editbin.exe
|
2020-08-05 03:15:20 +00:00
|
|
|
HINTS ${EDITBIN_DIRECTORY}
|
Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.
Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.
This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.
Addtiionally, this heavily improves our detection of libraries, etc.
2019-04-07 09:57:55 +00:00
|
|
|
)
|
|
|
|
|
2020-09-25 11:55:25 +00:00
|
|
|
if(EDITBIN_EXECUTABLE)
|
2020-08-05 03:15:20 +00:00
|
|
|
message(CHECK_PASS "found")
|
2020-09-25 11:55:25 +00:00
|
|
|
else()
|
2020-08-05 03:15:20 +00:00
|
|
|
message(CHECK_FAIL "not found , please manually specify EDITBIN_DIRECTORY")
|
2020-09-25 11:55:25 +00:00
|
|
|
endif()
|
2020-08-05 03:15:20 +00:00
|
|
|
|
Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.
Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.
This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.
Addtiionally, this heavily improves our detection of libraries, etc.
2019-04-07 09:57:55 +00:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(Editbin
|
|
|
|
FOUND_VAR EDITBIN_FOUND
|
|
|
|
REQUIRED_VARS EDITBIN_EXECUTABLE
|
|
|
|
)
|