cmake: Use python_add_module function
authorAndreas Schneider <asn@samba.org>
Wed, 16 Dec 2015 09:16:32 +0000 (10:16 +0100)
committerAndreas Schneider <asn@samba.org>
Fri, 8 Jan 2016 12:06:54 +0000 (13:06 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
src/python/CMakeLists.txt

index 75bd16f6b29fec71db4bfd3effb0e70870bd16ae..22e672405064da785cd39860449bd76b39739c25 100644 (file)
@@ -4,11 +4,5 @@ include_directories(${CMAKE_BINARY_DIR})
 include_directories(${pam_wrapper-headers_DIR})
 include_directories(${PYTHON_INCLUDE_DIR})
 
-add_library(pypamtest MODULE pypamtest.c)
-target_link_libraries(pypamtest pamtest pam ${PYTHON_LIBRARY})
-
-set_target_properties(
-  pypamtest
-    PROPERTIES
-       PREFIX "")
-
+python_add_module(pypamtest pypamtest.c)
+target_link_libraries(pypamtest pamtest)