mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
21 lines
351 B
CMake
21 lines
351 B
CMake
include(CheckCXXSourceCompiles)
|
|
set(CMAKE_REQUIRED_LIBRARIES "dl")
|
|
|
|
check_cxx_source_compiles("
|
|
#include <dlfcn.h>
|
|
int main() {
|
|
Dl_info info;
|
|
return dladdr(0, &info);
|
|
}"
|
|
DL_FOUND
|
|
)
|
|
|
|
if (DL_FOUND)
|
|
add_compile_options(
|
|
-DWITH_DL
|
|
)
|
|
link_libraries(dl)
|
|
endif (DL_FOUND)
|
|
|
|
set(CMAKE_REQUIRED_LIBRARIES "")
|