ref: 5a238e45005d9c5c51a0e9f27bf52303f8e6a674
parent: 022c14c3cf3d0cd0045b60f5108b6fdb5f4c8b5b
author: Azamat H. Hackimov <azamat.hackimov@gmail.com>
date: Sat May 30 08:40:26 EDT 2015
Add support to multilib linux enviroment and link to -lm In Linux we can install 32- and 64-bit libraries all together. Allegro 5 require -lm flag since test program fails to compile without -lm: #include <dumb.h> int main(void) { dumb_register_stdfiles(); return 0; }
--- a/dumb/cmake/CMakeLists.txt
+++ b/dumb/cmake/CMakeLists.txt
@@ -110,9 +110,11 @@
set_target_properties(dumb PROPERTIES INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib)
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+target_link_libraries(dumb m)
+
INSTALL(FILES ${INSTALL_HEADERS} DESTINATION include/)
INSTALL(TARGETS dumb
RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
)