Fix linker library search path
authorMyhailo Danylenko <isbear@ukrpost.net>
Sun, 17 Jan 2010 12:53:54 +0200
changeset 5 d745f94ecc08
parent 4 faaed3ae3fa8
child 6 c949c6c0aa58
Fix linker library search path
CMakeLists.txt
--- a/CMakeLists.txt	Fri Jan 15 15:44:00 2010 +0200
+++ b/CMakeLists.txt	Sun Jan 17 12:53:54 2010 +0200
@@ -17,12 +17,33 @@
 cmake_minimum_required(VERSION 2.6) 
 project(yaubil C) 
 
+## User settable options
+set(MCABBER_INCLUDE_DIR "/usr/include" CACHE FILEPATH "Path to mcabber headers") 
+ 
+## Check for build dependencies
+find_package(PkgConfig REQUIRED) 
+pkg_check_modules(GLIB REQUIRED glib-2.0) 
+pkg_check_modules(GMODULE REQUIRED gmodule-2.0) 
+link_directories(${GLIB_LIBRARY_DIRS}
+				 ${GMODULE_LIBRARY_DIRS})
+
 ## Target definitions
 add_library(yaubil MODULE yaubil.c) 
 
-## User settable options
-set(MCABBER_INCLUDE_DIR "/usr/include" CACHE FILEPATH "Path to mcabber headers") 
- 
+## Compiler setup
+include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} 
+                    ${GMODULE_INCLUDE_DIRS}
+                    ${MCABBER_INCLUDE_DIR})
+target_link_libraries(yaubil ${GLIB_LIBRARIES} 
+                      ${GMODULE_LIBRARIES})
+include_directories(${yaubil_SOURCE_DIR} 
+                    ${yaubil_BINARY_DIR})
+
+## Installation
+install(TARGETS yaubil DESTINATION lib/mcabber) 
+install(FILES COPYING yaubil.rc README TODO DESTINATION share/doc/${CPACK_PACKAGE_NAME})
+install(DIRECTORY help DESTINATION share/mcabber)
+
 ## Packaging information
 set(CPACK_PACKAGE_NAME libmcabber-yaubil)
 set(CPACK_PACKAGE_VERSION "0.0.1")
@@ -43,25 +64,4 @@
 set(CPACK_SOURCE_IGNORE_FILES "/\\\\..*;\\\\.swp;~$;/build/;\\\\.tar\\\\.;\\\\.deb;\\\\.so")
 include(CPack)
 
-## Check for build dependencies
-find_package(PkgConfig REQUIRED) 
-pkg_check_modules(GLIB REQUIRED glib-2.0) 
-pkg_check_modules(GMODULE REQUIRED gmodule-2.0) 
-
-## Compiler setup
-include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} 
-                    ${GMODULE_INCLUDE_DIRS} 
-                    ${LM_INCLUDE_DIRS}
-                    ${MCABBER_INCLUDE_DIR})
-target_link_libraries(yaubil ${GLIB_LIBRARIES} 
-                      ${GMODULE_LIBRARIES}
-					  ${LM_LIBRARIES})
-include_directories(${yaubil_SOURCE_DIR} 
-                    ${yaubil_BINARY_DIR})
-
-## Installation
-install(TARGETS yaubil DESTINATION lib/mcabber) 
-install(FILES COPYING yaubil.rc README TODO DESTINATION share/doc/${CPACK_PACKAGE_NAME})
-install(DIRECTORY help DESTINATION share/mcabber)
-
 ## The End ## vim: se ts=4: ##