Merging r261033:
[oota-llvm.git] / lib / ExecutionEngine / IntelJITEvents / CMakeLists.txt
index 7d67d0d..65f2a2f 100644 (file)
@@ -1,11 +1,17 @@
+include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
 
-include_directories( ${LLVM_INTEL_JITEVENTS_INCDIR} ${CMAKE_CURRENT_SOURCE_DIR}/.. )
-
-set(system_libs
-  ${system_libs}
-  jitprofiling
-  )
+if( HAVE_LIBDL )
+    set(LLVM_INTEL_JIT_LIBS ${CMAKE_DL_LIBS})
+endif()
+if( HAVE_LIBPTHREAD )
+    set(LLVM_INTEL_JIT_LIBS pthread ${LLVM_INTEL_JIT_LIBS})
+endif()
 
 add_llvm_library(LLVMIntelJITEvents
   IntelJITEventListener.cpp
-  )
+  jitprofiling.c
+
+  LINK_LIBS ${LLVM_INTEL_JIT_LIBS}
+)
+
+add_dependencies(LLVMIntelJITEvents LLVMCodeGen)