pe-parse/pe-parser-library/cmake/peparse-config.cmake
Tony Theodore 64989f688a CMake improvements, MinGW compatibility, shared libs support
* mingw-w64 fixes

  - `WIN32` is user-defined, `_WIN32` is pre-defined by toolchain[1]
  - use gcc options instead of MSVC
    - `-fPIC` is redundant on mingw
    - don't error on `old-style-cast`

[1] https://msdn.microsoft.com/en-us/library/b0084kay.aspx

* add option to build shared libs

* add option to disable command line tools

* ignore more Visual Studio files

* enable shared builds on MSVC (with cmake >= 3.4)

https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/

* fix old-style-cast warning
2018-03-27 14:52:05 +02:00

6 lines
250 B
CMake

find_path(PEPARSE_INCLUDE_DIR "parser-library/parse.h")
find_library(PEPARSE_LIBRARIES NAMES "libpe-parser-library")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(peparse DEFAULT_MSG PEPARSE_INCLUDE_DIR PEPARSE_LIBRARIES)